Expand description
This crate provides TimeSpan
and TimeStamp
types for working with time
in ergonomic way in game engines.
TimeSpan
is a type that represents a time span in nanoseconds.
Similar to std::time::Duration
, but smaller and thus faster.
TimeStamp
is a type that represents a point in time in nanoseconds,
relative to reference point.
Clock
is a type that represents a clock to measure time and steps.
Frequency
and FrequencyTicker
allow exact frequency ticker using
rational values.
§Features
Macros§
- Converts human-readable expression into
TimeSpan
. - Converts human-readable expression into
TimeSpan
. Shortcut fortimespan!
.
Structs§
- Time measuring device. Uses system monotonic clock counter and yields
ClockStep
s for each step. - Time measuring device. Uses system monotonic clock counter and yields
ClockStep
s for each step. - Result of
Clock
step. Contains time stamp corresponding to “now” and time span since previous step. - Represents frequency. Able to accurately represent any rational frequency.
- Iterator over ticks from
FrequencyTicker
. - An interval in between time stamps. This type is used to represent durations with nanosecond precision.
- A fixed point in time relative to the reference point in time.
Traits§
- This trait adds methods to integers to convert values into
Frequency
s. - This trait adds methods to integers to convert values into
TimeSpan
s.