Lunchbox  1.14.0
Multi-threaded C++ toolbox library for all application developers creating high-performance multi-threaded programs.
lunchbox::Clock Class Reference

A class for time measurements. More...

#include <clock.h>

+ Collaboration diagram for lunchbox::Clock:

Public Member Functions

 Clock ()
 Construct a new clock. More...
 
 Clock (const Clock &from)
 Copy-construct a new clock with the same start time . More...
 
 ~Clock ()
 Destroy the clock. More...
 
Clockoperator= (const Clock &ref)
 Assignment operator. More...
 
void reset ()
 Reset the base time of the clock to the current time. More...
 
void set (const int64_t time)
 Set the current time of the clock. More...
 
float getTimef () const
 
float resetTimef ()
 
int64_t getTime64 () const
 
double getTimed () const
 

Detailed Description

A class for time measurements.

Definition at line 31 of file clock.h.

Constructor & Destructor Documentation

lunchbox::Clock::Clock ( )

Construct a new clock.

Version
1.0
lunchbox::Clock::Clock ( const Clock from)

Copy-construct a new clock with the same start time .

Version
1.0
lunchbox::Clock::~Clock ( )

Destroy the clock.

Version
1.0

Member Function Documentation

int64_t lunchbox::Clock::getTime64 ( ) const
Returns
the elapsed time in milliseconds since the last clock reset.
Version
1.0

Referenced by lunchbox::Referenced::ref().

+ Here is the caller graph for this function:

double lunchbox::Clock::getTimed ( ) const
Returns
the elapsed time in milliseconds since the last clock reset.
Version
1.0
float lunchbox::Clock::getTimef ( ) const
Returns
the elapsed time in milliseconds since the last clock reset.
Version
1.0
Clock& lunchbox::Clock::operator= ( const Clock ref)

Assignment operator.

Version
1.7.2
void lunchbox::Clock::reset ( )

Reset the base time of the clock to the current time.

Version
1.0
float lunchbox::Clock::resetTimef ( )
Returns
the elapsed time in milliseconds since the last clock reset and atomically reset the clock.
Version
1.0
void lunchbox::Clock::set ( const int64_t  time)

Set the current time of the clock.

Version
1.0

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