Simbody  3.7

These functions provide measurement of CPU time consumed by a process or by individual threads. More...

Functions

double SimTK::cpuTime ()
 Return the cumulative CPU time in seconds (both kernel and user time) that has been used so far by any of the threads in the currently executing process. More...
 
double SimTK::threadCpuTime ()
 Return the total CPU time in seconds (both kernel and user time) that has been used so far by the currently executing thread. More...
 

Detailed Description

These functions provide measurement of CPU time consumed by a process or by individual threads.

Time includes both kernel and user time together, and is reported as a double precision floating point value in seconds. CPU timers typically have a very coarse resolution, likely to be in the 10-50ms range depending on the particulars of your system. That means you won't get repeatable results unless you measure substantial amounts of CPU time; don't expect to get meaningful information measuring CPU times of less than a second or so.

Function Documentation

◆ cpuTime()

double SimTK::cpuTime ( )
inline

Return the cumulative CPU time in seconds (both kernel and user time) that has been used so far by any of the threads in the currently executing process.

Returns
CPU time used since this process was created, in seconds, as a double precision floating point number.
See also
threadCpuTime()

◆ threadCpuTime()

double SimTK::threadCpuTime ( )
inline

Return the total CPU time in seconds (both kernel and user time) that has been used so far by the currently executing thread.

Returns
CPU time used since this thread was created, in seconds, as a double precision floating point number.
See also
cpuTime()