We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6360ca0 commit 8cfdf03Copy full SHA for 8cfdf03
Sources/AsyncAlgorithms/AsyncThrottleSequence.swift
@@ -85,7 +85,7 @@ extension AsyncThrottleSequence: AsyncSequence {
85
// ensure the rate of elements never exceeds the given interval
86
let amount = interval - last.duration(to: clock.now)
87
if amount > .zero {
88
- try? await clock.sleep(for: amount)
+ try? await clock.sleep(until: clock.now.advanced(by: amount), tolerance: nil)
89
}
90
91
// the last value is unable to have any subsequent
0 commit comments