Trait riddle_time::ext::TimeSystemExt [−][src]
Required methods
fn new_shared() -> TimeSystemHandle
[src]
Create a new time system. The time the system is created is used as the time of the 0th frame.
fn process_frame(&self)
[src]
Update the time system state, marking the beginning of a the next frame.
The instant that this method is called is taken as the reference time for the frame that is about to be executed.
Timers will also be triggered during this function call if they are due to trigger.
Do not call this function directly if you are using this through the
riddle
crate.
Example
let frame_1 = time_system.frame_instant(); // A while later let frame_n = time_system.frame_instant(); assert_eq!(true, frame_n - frame_1 > std::time::Duration::from_secs(0));