Initial release

This commit is contained in:
aculix committed 2026-09-28 18:28:32 +05:30
commit 4b67728cce
108 files changed
+13310

No files matched your search

@@ -0,0 +1,15 @@
/// `ContinuousClock` keeps counting while the Mac sleeps, so an expired idle countdown fires on wake.
public protocol KnotchyClock: Sendable {
var now: ContinuousClock.Instant { get }
func sleep(until deadline: ContinuousClock.Instant) async throws
}
public struct SystemClock: KnotchyClock {
public init() {}
public var now: ContinuousClock.Instant { .now }
public func sleep(until deadline: ContinuousClock.Instant) async throws {
try await Task.sleep(until: deadline, clock: .continuous)
}
}