All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
Aux::Timer Class Reference

A timer for running time measurements. More...

#include <Timer.h>

Public Member Functions

 Timer ()
 
virtual my_steady_clock::time_point start ()
 Start the clock. More...
 
virtual my_steady_clock::time_point stop ()
 Stops the clock permanently for the instance of the Timer. More...
 
virtual std::chrono::duration
< uint64_t, std::milli > 
elapsed () const
 The number of milliseconds since the current time that the Timer object was created. More...
 
virtual uint64_t elapsedMilliseconds () const
 The number of milliseconds since the current time that the Timer object was created. More...
 
virtual uint64_t elapsedMicroseconds ()
 The number of microseconds since the current time that the Timer object was created. More...
 
virtual uint64_t elapsedNanoseconds ()
 The number of nanoseconds since the current time that the Timer object was created. More...
 
virtual my_steady_clock::time_point startTime ()
 Returns the time at which the instance was started. More...
 
virtual my_steady_clock::time_point stopTime ()
 Returns the time at which the instance was stopped. More...
 
virtual std::string elapsedTag ()
 

Protected Attributes

bool running
 true if timer has been started and not stopped after that More...
 
my_steady_clock::time_point started
 time at which timer has been started More...
 
my_steady_clock::time_point stopped
 time at which timer has been stopped More...
 

Detailed Description

A timer for running time measurements.

Constructor & Destructor Documentation

Aux::Timer::Timer ( )

Member Function Documentation

std::chrono::duration< uint64_t, std::milli > Aux::Timer::elapsed ( ) const
virtual

The number of milliseconds since the current time that the Timer object was created.

If stop() was called, it is the number of seconds from the instance creation until stop() was called.

uint64_t Aux::Timer::elapsedMicroseconds ( )
virtual

The number of microseconds since the current time that the Timer object was created.

If stop() was called, it is the number of seconds from the instance creation until stop() was called.

uint64_t Aux::Timer::elapsedMilliseconds ( ) const
virtual

The number of milliseconds since the current time that the Timer object was created.

If stop() was called, it is the number of seconds from the instance creation until stop() was called.

uint64_t Aux::Timer::elapsedNanoseconds ( )
virtual

The number of nanoseconds since the current time that the Timer object was created.

If stop() was called, it is the number of seconds from the instance creation until stop() was called.

std::string Aux::Timer::elapsedTag ( )
virtual
my_steady_clock::time_point Aux::Timer::start ( )
virtual

Start the clock.

Returns the time at which the instance was started.

my_steady_clock::time_point Aux::Timer::startTime ( )
virtual

Returns the time at which the instance was started.

my_steady_clock::time_point Aux::Timer::stop ( )
virtual

Stops the clock permanently for the instance of the Timer.

Returns the time at which the instance was stopped.

my_steady_clock::time_point Aux::Timer::stopTime ( )
virtual

Returns the time at which the instance was stopped.

Member Data Documentation

bool Aux::Timer::running
protected

true if timer has been started and not stopped after that

my_steady_clock::time_point Aux::Timer::started
protected

time at which timer has been started

my_steady_clock::time_point Aux::Timer::stopped
protected

time at which timer has been stopped


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