Skip to content

Commit 95c34a1

Browse files
committed
add tokio::time::pause to msim
1 parent d3784f9 commit 95c34a1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

msim/src/sim/time/mod.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,16 @@ where
246246
}
247247
}
248248

249-
/// Supply tokio::time::advance() API (for compilation only - this method
250-
/// is meaningless inside the simulator).
249+
/// Supply tokio::time::advance() and tokio::time::pause() APIs (for compilation only -
250+
/// these methods are meaningless inside the simulator).
251251
pub async fn advance(_duration: Duration) {
252252
unimplemented!("cannot advance clock in simulation - use sleep() instead");
253253
}
254254

255+
pub fn pause() {
256+
unimplemented!("cannot pause clock in simulation");
257+
}
258+
255259
/// Require a `Future` to complete before the specified duration has elapsed.
256260
pub fn timeout<T: Future>(duration: Duration, future: T) -> Timeout<T> {
257261
let handle = TimeHandle::current();

0 commit comments

Comments
 (0)