Skip to main content

thread_cpu_work

Function thread_cpu_work 

Source
pub fn thread_cpu_work() -> Option<u64>
Expand description

The work the calling thread has done so far, as a count that only this thread’s other readings are comparable to: CPU nanoseconds on Unix (CLOCK_THREAD_CPUTIME_ID), CPU cycles on Windows (QueryThreadCycleTime). Time the thread spent waiting for a CPU, as on a busy machine, is not in it, which is what a test that compares the work of two input sizes needs. None where the operating system does not report it (or this build does not read it there).