#include <Timer.h>
List of all members.
Public Member Functions |
| Timer () |
| Timer (const Timer &other) |
| ~Timer () |
void | clear () |
| Empties out all recorded timings so far AND sets last_time to now.
|
void | fast_forward () |
| Skips ahead and sets last time to now.
|
void | record (const std::string &name) |
| Records time since start or last call to record.
|
Timer & | operator+= (const Timer &other) |
| Appends timings from another timer to those for this one.
|
timing_t | start_time () const |
| Returns when the timer was initially constructed.
|
void | write (std::ostream &out=std::cout, bool print_total=false) const |
| Prints all timings (nicely formatted, in sec) to a file.
|
void | dump (std::ostream &out=std::cout, bool print_total=false) |
| Writes AND clears.
|
timing_t | operator[] (const std::string &name) const |
| Returns the i-th timing recorded (starting with 0)
|
Timer & | operator= (const Timer &other) |
Detailed Description
Definition at line 11 of file Timer.h.
Constructor & Destructor Documentation
Member Function Documentation
Empties out all recorded timings so far AND sets last_time to now.
Definition at line 35 of file Timer.cpp.
void dump |
( |
std::ostream & |
out = std::cout , |
|
|
bool |
print_total = false |
|
) |
| [inline] |
Writes AND clears.
Definition at line 51 of file Timer.h.
Skips ahead and sets last time to now.
Definition at line 43 of file Timer.cpp.
Appends timings from another timer to those for this one.
Also updates last according to that of other timer.
Definition at line 62 of file Timer.cpp.
timing_t operator[] |
( |
const std::string & |
name ) |
const [inline] |
Returns the i-th timing recorded (starting with 0)
Definition at line 57 of file Timer.h.
void record |
( |
const std::string & |
name ) |
|
Records time since start or last call to record.
Returns when the timer was initially constructed.
Definition at line 45 of file Timer.h.
void write |
( |
std::ostream & |
out = std::cout , |
|
|
bool |
print_total = false |
|
) |
| const |
Prints all timings (nicely formatted, in sec) to a file.
Definition at line 74 of file Timer.cpp.
The documentation for this class was generated from the following files: