|
Thrill
0.1
|
Definition at line 42 of file stats_timer.hpp.
Collaboration diagram for StatsTimerBase< true >:#include <stats_timer.hpp>
Public Types | |
| using | duration = std::chrono::microseconds |
| using | steady_clock = std::chrono::steady_clock |
| using | time_point = std::chrono::steady_clock::time_point |
Public Member Functions | |
| StatsTimerBase (bool start_immediately) | |
| Initialize and optionally immediately start the timer. More... | |
| StatsTimerBase (StatsTimerBase &&)=default | |
| move-constructor: default More... | |
| duration | Accumulated () const |
| return currently accumulated time More... | |
| std::chrono::microseconds::rep | Microseconds () const |
| return currently accumulated time in microseconds More... | |
| std::chrono::milliseconds::rep | Milliseconds () const |
| return currently accumulated time in milliseconds More... | |
| double | MillisecondsDouble () const |
| StatsTimerBase & | operator+= (const StatsTimerBase &tm) |
| accumulate elapsed time from another timer More... | |
| StatsTimerBase & | operator= (StatsTimerBase &&)=default |
| move-assignment operator: default More... | |
| bool | Real () const |
| Whether the timer is real. More... | |
| StatsTimerBase & | Reset () |
| return accumulated time More... | |
| bool | running () const |
| Whether the timer is running. More... | |
| std::chrono::seconds::rep | Seconds () const |
| return currently accumulated time in seconds More... | |
| double | SecondsDouble () const |
| StatsTimerBase & | Start () |
| start timer More... | |
| StatsTimerBase & | StartEventually () |
| start timer only if it not running More... | |
| StatsTimerBase & | Stop () |
| stop timer More... | |
| StatsTimerBase & | StopEventually () |
| stop timer if it is running More... | |
Protected Attributes | |
| duration | accumulated_ |
| total accumulated time in microseconds. More... | |
| time_point | last_start_ |
| last start time of the stop watch More... | |
| common::AtomicMovable< bool > | running_ |
| boolean whether the timer is currently running More... | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const StatsTimerBase &t) |
| direct <<-operator for ostream. Can be used for printing with std::cout. More... | |
| JsonLine & | Put (JsonLine &line, const StatsTimerBase &t) |
| using duration = std::chrono::microseconds |
Definition at line 48 of file stats_timer.hpp.
| using steady_clock = std::chrono::steady_clock |
Definition at line 45 of file stats_timer.hpp.
| using time_point = std::chrono::steady_clock::time_point |
Definition at line 46 of file stats_timer.hpp.
|
inlineexplicit |
Initialize and optionally immediately start the timer.
Definition at line 62 of file stats_timer.hpp.
|
default |
move-constructor: default
|
inline |
return currently accumulated time
Definition at line 121 of file stats_timer.hpp.
|
inline |
return currently accumulated time in microseconds
Definition at line 132 of file stats_timer.hpp.
|
inline |
return currently accumulated time in milliseconds
Definition at line 138 of file stats_timer.hpp.
|
inline |
return currently accumulated time in seconds as double with microseconds precision
Definition at line 157 of file stats_timer.hpp.
|
inline |
accumulate elapsed time from another timer
Definition at line 162 of file stats_timer.hpp.
|
default |
move-assignment operator: default
|
inline |
Whether the timer is real.
Definition at line 73 of file stats_timer.hpp.
|
inline |
return accumulated time
Definition at line 114 of file stats_timer.hpp.
|
inline |
Whether the timer is running.
Definition at line 76 of file stats_timer.hpp.
|
inline |
return currently accumulated time in seconds
Definition at line 144 of file stats_timer.hpp.
|
inline |
return currently accumulated time in seconds as double with microseconds precision
Definition at line 151 of file stats_timer.hpp.
|
inline |
start timer
Definition at line 81 of file stats_timer.hpp.
|
inline |
start timer only if it not running
Definition at line 89 of file stats_timer.hpp.
|
inline |
stop timer
Definition at line 98 of file stats_timer.hpp.
|
inline |
stop timer if it is running
Definition at line 107 of file stats_timer.hpp.
|
friend |
direct <<-operator for ostream. Can be used for printing with std::cout.
Definition at line 168 of file stats_timer.hpp.
|
friend |
Definition at line 172 of file stats_timer.hpp.
|
protected |
total accumulated time in microseconds.
Definition at line 55 of file stats_timer.hpp.
|
protected |
last start time of the stop watch
Definition at line 58 of file stats_timer.hpp.
|
protected |
boolean whether the timer is currently running
Definition at line 52 of file stats_timer.hpp.