OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
osg::Timer Class Reference

#include <Timer.h>

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.

Definition at line 28 of file Timer.h.

Constructor & Destructor Documentation

osg::Timer::Timer ( )
osg::Timer::~Timer ( )
inline

Definition at line 33 of file Timer.h.

Member Function Documentation

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

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

Definition at line 62 of file Timer.h.

Here is the caller graph for this function:

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

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

Definition at line 68 of file Timer.h.

Here is the caller graph for this function:

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

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

Definition at line 59 of file Timer.h.

Here is the caller graph for this function:

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

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

Definition at line 65 of file Timer.h.

Here is the caller graph for this function:

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

Get the number of seconds per tick.

Definition at line 71 of file Timer.h.

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

Definition at line 43 of file Timer.h.

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

Here is the caller graph for this function:

void osg::Timer::setStartTick ( )
inline

Set the start.

Definition at line 41 of file Timer.h.

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

Definition at line 42 of file Timer.h.

Timer_t osg::Timer::tick ( ) const

Get the timers tick value.

Here is the caller graph for this function:

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

Get elapsed time in milliseconds.

Definition at line 50 of file Timer.h.

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

Get elapsed time in nanoseconds.

Definition at line 56 of file Timer.h.

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

Get elapsed time in seconds.

Definition at line 47 of file Timer.h.

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

Get elapsed time in microseconds.

Definition at line 53 of file Timer.h.

Member Data Documentation

double osg::Timer::_secsPerTick
protected

Definition at line 76 of file Timer.h.

Timer_t osg::Timer::_startTick
protected

Definition at line 75 of file Timer.h.


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