diff --git a/crates/scheduler/src/test_scheduler.rs b/crates/scheduler/src/test_scheduler.rs index fcc6e5c1e7d567cc5157cf703467aea472ff3379..e69d3419cf46f8707bd2aa12d9a448dda62e547e 100644 --- a/crates/scheduler/src/test_scheduler.rs +++ b/crates/scheduler/src/test_scheduler.rs @@ -177,6 +177,12 @@ impl TestScheduler { } } + pub fn run_with_clock_advancement(&self) { + while self.step() || self.advance_clock_to_next_timer() { + // Continue until no work remains + } + } + /// Execute one tick of the scheduler, processing expired timers and running /// at most one task. Returns true if any work was done. ///