vSMC
vSMC: Scalable Monte Carlo
|
StopWatch as an adapter of C++11 clock. More...
#include <vsmc/utility/stop_watch.hpp>
Public Types | |
typedef ClockType | clock_type |
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 117 of file stop_watch.hpp.
typedef ClockType vsmc::StopWatchClockAdapter< ClockType >::clock_type |
Definition at line 121 of file stop_watch.hpp.
|
inline |
Definition at line 123 of file stop_watch.hpp.
|
inline |
Return the accumulated elapsed time in hours.
Definition at line 210 of file stop_watch.hpp.
|
inline |
Return the accumulated elapsed time in microseconds.
Definition at line 182 of file stop_watch.hpp.
|
inline |
Return the accumulated elapsed time in milliseconds.
Definition at line 189 of file stop_watch.hpp.
|
inline |
Return the accumulated elapsed time in minutes.
Definition at line 203 of file stop_watch.hpp.
|
inline |
Return the accumulated elapsed time in nanoseconds.
Definition at line 175 of file stop_watch.hpp.
|
inline |
Stop and reset the elapsed time to zero.
Definition at line 167 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 130 of file stop_watch.hpp.
|
inline |
Return the accumulated elapsed time in seconds.
Definition at line 196 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 138 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 154 of file stop_watch.hpp.