#include <CPUclock.h>
Public Methods | |
| CPUclock () | |
| double | getInterval () |
| double | getIntervalU () |
| void | initTime () |
| double | getTime () |
| void | lock () |
| void | unlock () |
| bool | locked () const |
NAME: CPUclock - measures the CPU time in C++ programs
DESCRIPTION:
One can get the user time in absolute seconds, or the length of intervals can be measured (in seconds).
|
|
The class has only one constructor which takes no arguments. |
|
|
returns the length of the user+system time interval (in seconds) between the present call to getInterval and the last call to "initTime" or to "getInterval". |
|
|
as "getInterval", but only the user time is returned. |
|
|
returns absolute user time in seconds |
|
|
start measuring the length of an interval (typically called prior to the computational job to be measured). In fact, "initTime" is just a call to "getInterval" - the purpose of the function is to make programs easier to read. |
|
|
locks the time, that is, when this function is called, calls to "getInterval" will not reset the time each time the function is called. |
|
|
returns true if timecounter is locked, and false otherwise. |
|
|
unlocks the time, that is, when this function is called, calls to "getInterval" will reset the time each time the function is called (default behaviour). |