-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
ConcurrencуArea → standard library: The `Concurrency` module under the standard library umbrellaArea → standard library: The `Concurrency` module under the standard library umbrellaWindowsPlatform: WindowsPlatform: WindowsbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.standard libraryArea: Standard library umbrellaArea: Standard library umbrellaswift 5.10timeArea → standard library → Concurrency: Time APIsArea → standard library → Concurrency: Time APIsunexpected behaviorBug: Unexpected behavior or incorrect outputBug: Unexpected behavior or incorrect output
Description
Description
No response
Reproduction
@main
public struct App {
public static func main() async throws {
let clock = ContinuousClock.continuous
let dur = try await clock.measure {
try await Task.sleep(for: .seconds(0.1))
}
print("Slept for: \(dur)")
}
}
Output:
Slept for: 64.1733749 seconds
Expected behavior
Task sleep for 0.1 second.
Environment
Swift version 5.10-dev (LLVM 7c3b53ecaad54fb, Swift ebaa8c6)
Target: x86_64-unknown-windows-msvc
Additional information
No response
Metadata
Metadata
Assignees
Labels
ConcurrencуArea → standard library: The `Concurrency` module under the standard library umbrellaArea → standard library: The `Concurrency` module under the standard library umbrellaWindowsPlatform: WindowsPlatform: WindowsbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.standard libraryArea: Standard library umbrellaArea: Standard library umbrellaswift 5.10timeArea → standard library → Concurrency: Time APIsArea → standard library → Concurrency: Time APIsunexpected behaviorBug: Unexpected behavior or incorrect outputBug: Unexpected behavior or incorrect output