feisty meow concerns codebase
2.140
|
A class for measuring event durations in real time. More...
#include <stopwatch.h>
Public Member Functions | |
stopwatch () | |
stopwatch (const stopwatch &to_copy) | |
virtual | ~stopwatch () |
stopwatch & | operator= (const stopwatch &to_copy) |
void | start () |
Begins the timing. More... | |
void | halt () |
Stops the timing. More... | |
void | stop () |
a synonym for halt(). More... | |
void | reset () |
Stops the stopwatch and clears it to zero time elapsed. More... | |
int | milliseconds () |
Returns the elapsed number of milliseconds on the stopwatch, overall. More... | |
int | elapsed () |
a synonym for milliseconds(). More... | |
A class for measuring event durations in real time.
Once the stopwatch is constructed, it can then be repeatedly started and halted, and then started again. The number of milliseconds or microseconds elapsed can be requested while the stopwatch is running, but that can disrupt fine-grained measurements.
Definition at line 28 of file stopwatch.h.
timely::stopwatch::stopwatch | ( | ) |
Definition at line 26 of file stopwatch.cpp.
timely::stopwatch::stopwatch | ( | const stopwatch & | to_copy | ) |
Definition at line 33 of file stopwatch.cpp.
|
virtual |
Definition at line 40 of file stopwatch.cpp.
References basis::WHACK().
|
inline |
void timely::stopwatch::halt | ( | ) |
Stops the timing.
start() may be called again to resume timing after the halt. If the stopwatch is already stopped, or never was started, then halt does nothing.
Definition at line 71 of file stopwatch.cpp.
Referenced by stop().
int timely::stopwatch::milliseconds | ( | ) |
Returns the elapsed number of milliseconds on the stopwatch, overall.
Definition at line 59 of file stopwatch.cpp.
Referenced by elapsed().
Definition at line 47 of file stopwatch.cpp.
void timely::stopwatch::reset | ( | ) |
Stops the stopwatch and clears it to zero time elapsed.
Definition at line 57 of file stopwatch.cpp.
void timely::stopwatch::start | ( | ) |
Begins the timing.
If the stopwatch is already timing, then "start" does nothing.
Definition at line 61 of file stopwatch.cpp.
|
inline |