Thrill  0.1
StatsTimerBase< false > Class Template Reference

Detailed Description

template<>
class thrill::common::StatsTimerBase< false >

Examples:
tests/common/stats_timer_test.cpp.

Definition at line 178 of file stats_timer.hpp.

#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)
 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
 
StatsTimerBaseoperator+= (const StatsTimerBase &)
 accumulate elapsed time from another timer More...
 
StatsTimerBaseoperator= (StatsTimerBase &&)=default
 move-assignment operator: default More...
 
bool Real () const
 Whether the timer is real. More...
 
StatsTimerBaseReset ()
 return accumulated time More...
 
bool running () const
 Whether the timer is running. More...
 
std::chrono::seconds::rep Seconds () const
 return currently accumulated time in milliseconds More...
 
double SecondsDouble () const
 
StatsTimerBaseStart ()
 start timer More...
 
StatsTimerBaseStartEventually ()
 start timer only if it not running More...
 
StatsTimerBaseStop ()
 stop timer More...
 
StatsTimerBaseStopEventually ()
 stop timer if it is running More...
 

Friends

std::ostream & operator<< (std::ostream &os, const StatsTimerBase &)
 direct <<-operator for ostream. Can be used for printing with std::cout. More...
 
JsonLinePut (JsonLine &line, const StatsTimerBase &t)
 

Member Typedef Documentation

◆ duration

using duration = std::chrono::microseconds

Definition at line 184 of file stats_timer.hpp.

◆ steady_clock

using steady_clock = std::chrono::steady_clock

Definition at line 181 of file stats_timer.hpp.

◆ time_point

using time_point = std::chrono::steady_clock::time_point

Definition at line 182 of file stats_timer.hpp.

Constructor & Destructor Documentation

◆ StatsTimerBase() [1/2]

StatsTimerBase ( bool  )
inlineexplicit

Initialize and optionally immediately start the timer.

Definition at line 187 of file stats_timer.hpp.

◆ StatsTimerBase() [2/2]

StatsTimerBase ( StatsTimerBase< false > &&  )
default

move-constructor: default

Member Function Documentation

◆ Accumulated()

duration Accumulated ( ) const
inline

return currently accumulated time

Definition at line 228 of file stats_timer.hpp.

◆ Microseconds()

std::chrono::microseconds::rep Microseconds ( ) const
inline

return currently accumulated time in microseconds

Examples:
tests/common/stats_timer_test.cpp.

Definition at line 233 of file stats_timer.hpp.

◆ Milliseconds()

std::chrono::milliseconds::rep Milliseconds ( ) const
inline

return currently accumulated time in milliseconds

Examples:
tests/common/stats_timer_test.cpp.

Definition at line 238 of file stats_timer.hpp.

◆ MillisecondsDouble()

double MillisecondsDouble ( ) const
inline

Definition at line 253 of file stats_timer.hpp.

◆ operator+=()

StatsTimerBase& operator+= ( const StatsTimerBase< false > &  )
inline

accumulate elapsed time from another timer

Definition at line 256 of file stats_timer.hpp.

◆ operator=()

StatsTimerBase& operator= ( StatsTimerBase< false > &&  )
default

move-assignment operator: default

◆ Real()

bool Real ( ) const
inline

Whether the timer is real.

Examples:
tests/common/stats_timer_test.cpp.

Definition at line 195 of file stats_timer.hpp.

◆ Reset()

StatsTimerBase& Reset ( )
inline

return accumulated time

Definition at line 223 of file stats_timer.hpp.

◆ running()

bool running ( ) const
inline

Whether the timer is running.

Definition at line 198 of file stats_timer.hpp.

◆ Seconds()

std::chrono::seconds::rep Seconds ( ) const
inline

return currently accumulated time in milliseconds

Examples:
tests/common/stats_timer_test.cpp.

Definition at line 243 of file stats_timer.hpp.

◆ SecondsDouble()

double SecondsDouble ( ) const
inline

return currently accumulated time in seconds as double with microseconds precision

Definition at line 249 of file stats_timer.hpp.

◆ Start()

StatsTimerBase& Start ( )
inline

start timer

Examples:
tests/common/stats_timer_test.cpp.

Definition at line 203 of file stats_timer.hpp.

◆ StartEventually()

StatsTimerBase& StartEventually ( )
inline

start timer only if it not running

Definition at line 208 of file stats_timer.hpp.

◆ Stop()

StatsTimerBase& Stop ( )
inline

stop timer

Examples:
tests/common/stats_timer_test.cpp.

Definition at line 213 of file stats_timer.hpp.

◆ StopEventually()

StatsTimerBase& StopEventually ( )
inline

stop timer if it is running

Definition at line 218 of file stats_timer.hpp.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const StatsTimerBase< false > &   
)
friend

direct <<-operator for ostream. Can be used for printing with std::cout.

Definition at line 261 of file stats_timer.hpp.

◆ Put

JsonLine& Put ( JsonLine line,
const StatsTimerBase< false > &  t 
)
friend

Definition at line 265 of file stats_timer.hpp.


The documentation for this class was generated from the following file: