vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vrecko::Timer Class Reference

#include <Timer.h>

Public Member Functions

 Timer ()
 
 ~Timer ()
 
osg::Timer_t tick () const
 
void setStartTick ()
 
void setStartTick (osg::Timer_t t)
 
osg::Timer_t getStartTick () const
 
double time_s () const
 
double time_m () const
 
double time_u () const
 
double time_n () const
 
double delta_s (osg::Timer_t t1, osg::Timer_t t2) const
 
double delta_m (osg::Timer_t t1, osg::Timer_t t2) const
 
double delta_u (osg::Timer_t t1, osg::Timer_t t2) const
 
double delta_n (osg::Timer_t t1, osg::Timer_t t2) const
 
double getSecondsPerTick () const
 

Static Public Member Functions

static Timerinstance ()
 

Protected Attributes

osg::Timer_t _startTick
 
double _secsPerTick
 

Constructor & Destructor Documentation

vrecko::Timer::Timer ( )
vrecko::Timer::~Timer ( )

Member Function Documentation

double vrecko::Timer::delta_m ( osg::Timer_t  t1,
osg::Timer_t  t2 
) const
inline

Get the time in milliseconds between timer ticks t1 and t2.

double vrecko::Timer::delta_n ( osg::Timer_t  t1,
osg::Timer_t  t2 
) const
inline

Get the time in nanoseconds between timer ticks t1 and t2.

double vrecko::Timer::delta_s ( osg::Timer_t  t1,
osg::Timer_t  t2 
) const
inline

Get the time in seconds between timer ticks t1 and t2.

double vrecko::Timer::delta_u ( osg::Timer_t  t1,
osg::Timer_t  t2 
) const
inline

Get the time in microseconds between timer ticks t1 and t2.

double vrecko::Timer::getSecondsPerTick ( ) const
inline

Get the the number of ticks per second.

osg::Timer_t vrecko::Timer::getStartTick ( ) const
inline
Timer * vrecko::Timer::instance ( )
static
void vrecko::Timer::setStartTick ( )
inline

Set the start.

void vrecko::Timer::setStartTick ( osg::Timer_t  t)
inline
osg::Timer_t vrecko::Timer::tick ( ) const

Get the timers tick value.

double vrecko::Timer::time_m ( ) const
inline

Get elapsed time in milliseconds.

double vrecko::Timer::time_n ( ) const
inline

Get elapsed time in nanoseconds.

double vrecko::Timer::time_s ( ) const
inline

Get elapsed time in seconds.

double vrecko::Timer::time_u ( ) const
inline

Get elapsed time in microseconds.

Member Data Documentation

double vrecko::Timer::_secsPerTick
protected
osg::Timer_t vrecko::Timer::_startTick
protected

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