Thrill  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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

using duration = std::chrono::microseconds

Definition at line 184 of file stats_timer.hpp.

using steady_clock = std::chrono::steady_clock

Definition at line 181 of file stats_timer.hpp.

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

Definition at line 182 of file stats_timer.hpp.

Constructor & Destructor Documentation

StatsTimerBase ( bool  )
inlineexplicit

Initialize and optionally immediately start the timer.

Definition at line 187 of file stats_timer.hpp.

StatsTimerBase ( StatsTimerBase< false > &&  )
default

move-constructor: default

Member Function Documentation

duration Accumulated ( ) const
inline

return currently accumulated time

Definition at line 228 of file stats_timer.hpp.

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.

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.

double MillisecondsDouble ( ) const
inline

Definition at line 253 of file stats_timer.hpp.

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

accumulate elapsed time from another timer

Definition at line 256 of file stats_timer.hpp.

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

move-assignment operator: default

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.

StatsTimerBase& Reset ( )
inline

return accumulated time

Definition at line 223 of file stats_timer.hpp.

bool running ( ) const
inline

Whether the timer is running.

Definition at line 198 of file stats_timer.hpp.

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.

double SecondsDouble ( ) const
inline

return currently accumulated time in seconds as double with microseconds precision

Definition at line 249 of file stats_timer.hpp.

StatsTimerBase& Start ( )
inline

start timer

Examples:
tests/common/stats_timer_test.cpp.

Definition at line 203 of file stats_timer.hpp.

StatsTimerBase& StartEventually ( )
inline

start timer only if it not running

Definition at line 208 of file stats_timer.hpp.

StatsTimerBase& Stop ( )
inline

stop timer

Examples:
tests/common/stats_timer_test.cpp.

Definition at line 213 of file stats_timer.hpp.

StatsTimerBase& StopEventually ( )
inline

stop timer if it is running

Definition at line 218 of file stats_timer.hpp.

Friends And Related Function Documentation

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.

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: