osg::Timer Class Reference

List of all members.

Public Member Functions

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

Static Public Member Functions

static Timerinstance ()

Protected Attributes

Timer_t _startTick
double _secsPerTick


Detailed Description

Timer class is used for measuring elapsed time or time between two points.

Constructor & Destructor Documentation

osg::Timer::Timer (  ) 

osg::Timer::~Timer (  )  [inline]


Member Function Documentation

static Timer* osg::Timer::instance (  )  [static]

Timer_t osg::Timer::tick (  )  const

void osg::Timer::setStartTick (  )  [inline]

Set the start.

void osg::Timer::setStartTick ( Timer_t  t  )  [inline]

Timer_t osg::Timer::getStartTick (  )  const [inline]

double osg::Timer::time_s (  )  const [inline]

Get elapsed time in seconds.

double osg::Timer::time_m (  )  const [inline]

Get elapsed time in milliseconds.

double osg::Timer::time_u (  )  const [inline]

Get elapsed time in micoseconds.

double osg::Timer::time_n (  )  const [inline]

Get elapsed time in nanoseconds.

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

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

Referenced by osg::ElapsedTime::elapsedTime(), osg::ElapsedTime::finish(), and osg::GraphicsContext::getTimeSinceLastClear().

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

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

Referenced by osg::ElapsedTime::elapsedTime_m().

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

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

Referenced by osg::ElapsedTime::elapsedTime_u().

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

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

Referenced by osg::ElapsedTime::elapsedTime_n().

double osg::Timer::getSecondsPerTick (  )  const [inline]

Get the the number of seconds per tick.


Member Data Documentation

double osg::Timer::_secsPerTick [protected]


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

Generated on Fri Mar 19 19:52:53 2010 for openscenegraph by  doxygen 1.5.6