Function tarantool::clock::process

source ·
pub fn process() -> f64
Expand description

The processor time.

Derived from C function clock_gettime(CLOCK_PROCESS_CPUTIME_ID). This is the best function to use with benchmarks that need to calculate the amount of time for which CPU was used.

Return: seconds or nanoseconds since processor start. Return type: u64 or f64

Example:

// This will print nanoseconds in the CPU since the start.
use tarantool::clock::process64;
println!("{}", process64());