mirror of
				https://github.com/maxgoedjen/secretive.git
				synced 2025-11-04 01:10:56 +00:00 
			
		
		
		
	Nanoseconds
This commit is contained in:
		
							parent
							
								
									079c2fabf0
								
							
						
					
					
						commit
						27f0b9b5b0
					
				@ -71,7 +71,7 @@ extension Secretive {
 | 
			
		||||
        Task {
 | 
			
		||||
            await LaunchAgentController().install()
 | 
			
		||||
            // Wait a second for launchd to kick in (next runloop isn't enough).
 | 
			
		||||
            await Task.sleep(UInt64(Measurement(value: 1, unit: UnitDuration.seconds).converted(to: .nanoseconds).value))
 | 
			
		||||
            try? await Task.sleep(nanoseconds: UInt64(Measurement(value: 1, unit: UnitDuration.seconds).converted(to: .nanoseconds).value))
 | 
			
		||||
            agentStatusChecker.check()
 | 
			
		||||
            if !agentStatusChecker.running {
 | 
			
		||||
                forceLaunchAgent()
 | 
			
		||||
 | 
			
		||||
@ -12,7 +12,7 @@ struct LaunchAgentController {
 | 
			
		||||
        // This is definitely a bit of a "seems to work better" thing but:
 | 
			
		||||
        // Seems to more reliably hit if these are on separate runloops, otherwise it seems like it sometimes doesn't kill old
 | 
			
		||||
        // and start new?
 | 
			
		||||
        await Task.sleep(UInt64(Measurement(value: 0.1, unit: UnitDuration.seconds).converted(to: .nanoseconds).value))
 | 
			
		||||
        try? await Task.sleep(nanoseconds: UInt64(Measurement(value: 0.1, unit: UnitDuration.seconds).converted(to: .nanoseconds).value))
 | 
			
		||||
        _  = setEnabled(true)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user