#include "utl/Stopwatch.h"
Public Types | |
| enum | CPUTime { eTotal, eUser, eSystem } |
Public Member Functions | |
| double | GetCPUTime (const CPUTime kind=eTotal) |
| void | Reset () |
| void | Start () |
| void | Stop () |
| Stopwatch () | |
Private Attributes | |
| bool | fIsStopped |
| struct tms | fStart |
| clock_t | fSystemTimeSum |
| clock_t | fUserTimeSum |
Static Private Attributes | |
| static const long | fgClockTicks = sysconf(_SC_CLK_TCK) |
Definition at line 16 of file Stopwatch.h.
| Enumerator | |
|---|---|
| eTotal | |
| eUser | |
| eSystem | |
Definition at line 19 of file Stopwatch.h.
| Stopwatch::Stopwatch | ( | ) |
Definition at line 11 of file Stopwatch.cc.
References fStart.
Definition at line 52 of file Stopwatch.cc.
References eSystem, eTotal, eUser, fgClockTicks, fIsStopped, fStart, fSystemTimeSum, fUserTimeSum, and utl::second.
Referenced by fwk::RunController::FinishBranch(), FdLightCollectionEfficiencyKG::SubModule::PrintTiming(), and TestTime::TestStopwatch().
| void Stopwatch::Reset | ( | ) |
Definition at line 21 of file Stopwatch.cc.
References fIsStopped, fSystemTimeSum, and fUserTimeSum.
Referenced by FdLightCollectionEfficiencyKG::SubModule::Init(), fwk::VModule::InitTiming(), and TestTime::TestStopwatch().
| void Stopwatch::Start | ( | ) |
Definition at line 29 of file Stopwatch.cc.
References fIsStopped, and fStart.
Referenced by FdLightCollectionEfficiencyKG::SubModule::Run(), fwk::VModule::RunWithTiming(), and TestTime::TestStopwatch().
| void Stopwatch::Stop | ( | ) |
Definition at line 39 of file Stopwatch.cc.
References fIsStopped, fStart, fSystemTimeSum, and fUserTimeSum.
Referenced by fwk::RunController::FinishBranch(), FdLightCollectionEfficiencyKG::SubModule::Run(), fwk::VModule::RunWithTiming(), and TestTime::TestStopwatch().
|
staticprivate |
Definition at line 33 of file Stopwatch.h.
Referenced by GetCPUTime().
|
private |
Definition at line 34 of file Stopwatch.h.
Referenced by GetCPUTime(), Reset(), Start(), and Stop().
|
private |
Definition at line 35 of file Stopwatch.h.
Referenced by GetCPUTime(), Start(), Stop(), and Stopwatch().
|
private |
Definition at line 37 of file Stopwatch.h.
Referenced by GetCPUTime(), Reset(), and Stop().
|
private |
Definition at line 36 of file Stopwatch.h.
Referenced by GetCPUTime(), Reset(), and Stop().