ContinuousClock not working for sleeping

// continuous version
let continuousClock = ContinuousClock()
let continuousElapsed = try await continuousClock.measure {
    try await Task.sleep(until: .now + .seconds(5), clock: .continuous)
}
print(continuousElapsed)


// suspending version
let suspendingClock = SuspendingClock()
let suspendingElapsed = try await suspendingClock.measure {
    try await Task.sleep(until: .now + .seconds(5), clock: .suspending)
}
print(suspendingElapsed)

result:

0.000126 seconds
5.324980708 seconds

Swift version: Apple Swift version 5.7 (swiftlang-5.7.0.113.202 clang-1400.0.16.2)

For those reading along at home, here's a link to the matching thread on Swift Forums.

ContinuousClock not working for sleeping
 
 
Q