|
Jpp
18.0.0-rc.3
the software that should make you happy
|
Auxiliary class for CPU timing and usage. More...
#include <JTimer.hh>
Public Types | |
| enum | JStatus_t { CLK_STOPPED = 0, CLK_RUNNING = 1 } |
| Status of clock. More... | |
| typedef unsigned long long | ull |
Public Member Functions | |
| JTimer () | |
| Default constructor. More... | |
| JTimer (const JTitle &title) | |
| Constructor. More... | |
| void | reset () |
| Reset timer. More... | |
| void | start () |
| Start timer. More... | |
| void | stop () |
| Stop timer. More... | |
| unsigned int | timing_get_cpu_percentage () const |
| Get CPU usage. More... | |
| void | print (std::ostream &out, const JScale_t scale=milli_t) const |
| Print timer data. More... | |
| void | print (std::ostream &out, const bool normalise, const JScale_t scale=milli_t) const |
| Print timer data. More... | |
| void | print (std::ostream &out, const double factor, const JScale_t scale=milli_t) const |
| Print timer data. More... | |
| const std::string & | getTitle () const |
| Get title. More... | |
| void | setTitle (const std::string &title) |
| Set title. More... | |
Static Public Member Functions | |
| static unsigned long long | timeval_to_usec (const struct timeval &tv) |
| Convert timeval to micro-seconds. More... | |
Public Attributes | |
| unsigned long long | usec_wall |
| unsigned long long | usec_ucpu |
| unsigned long long | usec_scpu |
| unsigned long long | counter |
Protected Attributes | |
| JStatus_t | status |
| std::string | title |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const JTimer &timer) |
| Print timer data. More... | |
| typedef unsigned long long JEEP::JTimer::ull |
Status of clock.
| Enumerator | |
|---|---|
| CLK_STOPPED | |
| CLK_RUNNING | |
Definition at line 42 of file JTimer.hh.
|
inline |
|
inline |
Constructor.
| title | title |
Definition at line 63 of file JTimer.hh.
|
inline |
|
inline |
Start timer.
Definition at line 89 of file JTimer.hh.
|
inline |
Stop timer.
Definition at line 113 of file JTimer.hh.
|
inline |
|
inlinestatic |
Print timer data.
| out | output stream |
| scale | scale |
Definition at line 161 of file JTimer.hh.
|
inline |
Print timer data.
| out | output stream |
| normalise | normalise to number of starts |
| scale | scale |
Definition at line 174 of file JTimer.hh.
|
inline |
Print timer data.
| out | output stream |
| factor | multiplication factor |
| scale | scale |
Definition at line 193 of file JTimer.hh.
|
inlineinherited |
Get title.
|
inlineinherited |
Set title.
| title | title |
|
friend |
Print timer data.
| out | output stream |
| timer | timer |
Definition at line 215 of file JTimer.hh.
|
protectedinherited |
1.8.5