[−][src]Function tarantool_module::clock::time
pub fn time() -> f64
The wall clock time.
Derived from C function clock_gettime(CLOCK_REALTIME)
.
This is the best function for knowing what the official time is, as determined by the system administrator.
Return: seconds or nanoseconds since epoch (1970-01-01 00:00:00), adjusted.
Return type: u64
or f64
Example:
// This will print an approximate number of years since 1970. use tarantool_module::clock::time; println!("{}", time() / (365 * 24 * 60 * 60));
See also: fiber::time(), fiber::time64()