Tinman  1.0
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Timer Class Reference

#include <timer.h>

Public Types

typedef std::chrono::steady_clock::duration DeltaTime
 
typedef std::chrono::steady_clock::time_point Time
 

Public Member Functions

 Timer ()
 
virtual ~Timer ()
 
float get_delta_time ()
 
void start ()
 
void restart ()
 
void stop ()
 
float get_time_since_start ()
 

Private Member Functions

float time_to_float (DeltaTime time)
 
float truncate (float number)
 
Time now ()
 

Private Attributes

Time last_time_
 
Time stop_
 
DeltaTime delta_
 
DeltaTime freeze_time_
 
float start_
 

Member Typedef Documentation

typedef std::chrono::steady_clock::duration Timer::DeltaTime
typedef std::chrono::steady_clock::time_point Timer::Time

Constructor & Destructor Documentation

Timer::Timer ( )
Timer::~Timer ( )
virtual

Member Function Documentation

float Timer::get_delta_time ( )
float Timer::get_time_since_start ( )
Timer::Time Timer::now ( )
private
void Timer::restart ( )
void Timer::start ( )
void Timer::stop ( )
float Timer::time_to_float ( Timer::DeltaTime  time)
private
float Timer::truncate ( float  number)
private

Member Data Documentation

DeltaTime Timer::delta_
private
DeltaTime Timer::freeze_time_
private
Time Timer::last_time_
private
float Timer::start_
private
Time Timer::stop_
private

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