We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 36f4581 + ff76625 commit aa0d0c8Copy full SHA for aa0d0c8
src/reactor.rs
@@ -187,7 +187,10 @@ impl Reactor {
187
let now = Instant::now();
188
189
// Split timers into ready and pending timers.
190
- let pending = timers.split_off(&(now, 0));
+ //
191
+ // Careful to split just *after* `now`, so that a timer set for exactly `now` is considered
192
+ // ready.
193
+ let pending = timers.split_off(&(now + Duration::from_nanos(1), 0));
194
let ready = mem::replace(&mut *timers, pending);
195
196
// Calculate the duration until the next event.
0 commit comments