vSMC
vSMC: Scalable Monte Carlo
|
StopWatch as an adapter of C++11 clock. More...
#include <vsmc/utility/stop_watch.hpp>
Public Types | |
using | clock_type = ClockType |
Public Member Functions | |
StopWatchClockAdapter () | |
double | hours () const |
Return the accumulated elapsed time in hours. More... | |
double | microseconds () const |
Return the accumulated elapsed time in microseconds. More... | |
double | milliseconds () const |
Return the accumulated elapsed time in milliseconds. More... | |
double | minutes () const |
Return the accumulated elapsed time in minutes. More... | |
double | nanoseconds () const |
Return the accumulated elapsed time in nanoseconds. More... | |
void | reset () |
Stop and reset the elapsed time to zero. More... | |
bool | running () const |
If the watch is running. More... | |
double | seconds () const |
Return the accumulated elapsed time in seconds. More... | |
bool | start () |
Start the watch, no effect if already started. More... | |
bool | stop () |
Stop the watch, no effect if already stopped. More... | |
StopWatch as an adapter of C++11 clock.
Definition at line 76 of file stop_watch.hpp.
using vsmc::StopWatchClockAdapter< ClockType >::clock_type = ClockType |
Definition at line 79 of file stop_watch.hpp.
|
inline |
Definition at line 81 of file stop_watch.hpp.
|
inline |
Return the accumulated elapsed time in hours.
Definition at line 174 of file stop_watch.hpp.
|
inline |
Return the accumulated elapsed time in microseconds.
Definition at line 142 of file stop_watch.hpp.
|
inline |
Return the accumulated elapsed time in milliseconds.
Definition at line 150 of file stop_watch.hpp.
|
inline |
Return the accumulated elapsed time in minutes.
Definition at line 166 of file stop_watch.hpp.
|
inline |
Return the accumulated elapsed time in nanoseconds.
Definition at line 134 of file stop_watch.hpp.
|
inline |
Stop and reset the elapsed time to zero.
Definition at line 126 of file stop_watch.hpp.
|
inline |
If the watch is running.
If start()
has been called and no stop()
call since, then it is running, otherwise it is stoped.
Definition at line 88 of file stop_watch.hpp.
|
inline |
Return the accumulated elapsed time in seconds.
Definition at line 158 of file stop_watch.hpp.
|
inline |
Start the watch, no effect if already started.
true
if it is started by this call, and the elapsed time will be incremented next time stop()
is called. The increment will be relative to the time point of this call. false
if it is already started earlier. Definition at line 97 of file stop_watch.hpp.
|
inline |
Stop the watch, no effect if already stopped.
true
if it is stoped by this call, and the elapsed time has been incremented. false
if it is already stopped or wasn't started before. Definition at line 113 of file stop_watch.hpp.