Lunchbox  1.6.0
Public Member Functions
lunchbox::Clock Class Reference

A class for time measurements. More...

#include <clock.h>

List of all members.

Public Member Functions

 Clock ()
 Construct a new clock.
 ~Clock ()
 Destroy the clock.
void reset ()
 Reset the base time of the clock to the current time.
void set (const int64_t time)
 Set the current time of the clock.
float getTimef () const
float resetTimef ()
int64_t getTime64 () const
double getTimed () const
float getMilliSecondsf () const
 Returns the millisecond part of the time elapsed since the last reset.

Detailed Description

A class for time measurements.

Definition at line 30 of file clock.h.


Constructor & Destructor Documentation

Construct a new clock.

Version:
1.0

Destroy the clock.

Version:
1.0

Member Function Documentation

Returns the millisecond part of the time elapsed since the last reset.

Obviously the returned time overflows once per second.

Returns:
the millisecond part of the time elapsed.
Version:
1.0
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

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

Version:
1.0
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: