@@ -20,7 +20,7 @@ use crate::current::Labels;
2020use crate :: runtime:: execution:: ExecutionState ;
2121
2222use crate :: runtime:: thread;
23- use crate :: sync :: time:: frozen:: FrozenTimeModel ;
23+ use crate :: time:: frozen:: FrozenTimeModel ;
2424
2525/// Constant stepped time model implementation
2626pub mod constant_stepped;
@@ -50,23 +50,31 @@ pub trait TimeModel: std::fmt::Debug {
5050 /// Wake the next sleeping task; returns true if there exists a task that was able to be woken.
5151 /// Called when all tasks are blocked to resolve timing based deadlocks (all unblocked tasks are sleeping).
5252 fn wake_next ( & mut self ) -> bool ;
53+
5354 /// Reset the TimeModel state for the next Shuttle iteration
5455 fn new_execution ( & mut self ) ;
56+
5557 /// Callback after each scheduling step to allow the TimeModel to update itself
5658 fn step ( & mut self ) ;
59+
5760 /// Used to create the TimeModel's Instant struct in functions like Instant::now()
5861 fn instant ( & self ) -> Instant ;
62+
5963 /// Pauses the TimeModel
6064 fn pause ( & mut self ) ;
65+
6166 /// Resumes the TimeModel
6267 fn resume ( & mut self ) ;
68+
6369 /// Manually advances the TimeModel's clock by a fixed amount
6470 fn advance ( & mut self , duration : Duration ) ;
71+
6572 /// Callback for registering a sleep/timeout on the current task. It is up to the TimeModel
6673 /// implementation to determine when to wake the sleeping task. If no waker is provided, then
6774 /// the caller is polling whether it is currently expired but is not yet performing a blocking
6875 /// sleep.
6976 fn register_sleep ( & mut self , deadline : Instant , id : u64 , waker : Option < Waker > ) -> bool ;
77+
7078 /// Downcast to Any for type casting / checking
7179 fn as_any_mut ( & mut self ) -> & mut dyn std:: any:: Any ;
7280}
0 commit comments