sleep(for:tolerance:)

    Suspends for the given duration.

    iOS
    16.0+
    macOS
    13.0+
    tvOS
    16.0+
    watchOS
    9.0+
    func sleep(for duration: Self.Instant.Duration, tolerance: Self.Instant.Duration? = nil) async throws

    Prefer to use the sleep(until:tolerance:) method on Clock if you have access to an absolute instant.

    Other members in extension

    Instance members