[−][src]Function tarantool_module::clock::monotonic
pub fn monotonic() -> f64
The monotonic time.
Derived from C function clock_gettime(CLOCK_MONOTONIC)
.
Monotonic time is similar to wall clock time but is not affected by changes to or from daylight saving time, or by
changes done by a user. This is the best function to use with benchmarks that need to calculate elapsed time.
Return: seconds or nanoseconds since the last time that the computer was booted.
Return type: u64
or f64
Example:
// This will print nanoseconds since the start. use tarantool_module::clock::monotonic64; println!("{}", monotonic64());