Starts timing CPU usage and return elapsed time from start. More...
Public Member Functions | |
cpuTime () | |
Construct with the current clock time. More... | |
double | elapsedCpuTime () const |
Return CPU time (in seconds) from the start. More... | |
double | cpuTimeIncrement () const |
Return CPU time (in seconds) since last call to cpuTimeIncrement() More... | |
Private Types | |
typedef struct tms | timeType |
Time structure used. More... | |
Static Private Member Functions | |
static void | getTime (timeType &) |
Retrieve the current time values from the system. More... | |
static double | timeDifference (const timeType &beg, const timeType &end) |
Difference between two times. More... | |
Private Attributes | |
timeType | startTime_ |
The start time. More... | |
timeType | lastTime_ |
timeType | newTime_ |
Static Private Attributes | |
static const long | Hz_ |
Clock-ticks per second. More... | |
Starts timing CPU usage and return elapsed time from start.
|
staticprivate |
double elapsedCpuTime | ( | ) | const |
Return CPU time (in seconds) from the start.
Definition at line 67 of file cpuTime.C.
Referenced by domainDecomposition::distributeCells(), and main().
double cpuTimeIncrement | ( | ) | const |
Return CPU time (in seconds) since last call to cpuTimeIncrement()
Definition at line 74 of file cpuTime.C.
Referenced by autoLayerDriver::addLayers(), meshRefinement::baffleAndSplitMesh(), autoSnapDriver::doSnap(), meshRefinement::handleSnapProblems(), main(), meshRefinement::mergeFreeStandingBaffles(), and writeMesh().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.