pub fn thread() -> f64
Expand description
The thread time.
Derived from C function clock_gettime(CLOCK_THREAD_CPUTIME_ID)
.
This is the best function to use with benchmarks that need to calculate hthe amount of time for which a CPU thread was used.
Return: seconds or nanoseconds since the transaction processor thread started.
Return type: u64
or f64
Example:
// This will print seconds in the thread since the start.
use tarantool::clock::thread64;
println!("{}", thread64());