OpenSceneGraph 3.6.5
|
Timer class is used for measuring elapsed time or time between two points. More...
#include <Timer>
Public Member Functions | |
Timer () | |
~Timer () | |
Timer_t | tick () const |
Get the timers tick value. | |
void | setStartTick () |
Set the start. | |
void | setStartTick (Timer_t t) |
Timer_t | getStartTick () const |
double | time_s () const |
Get elapsed time in seconds. | |
double | time_m () const |
Get elapsed time in milliseconds. | |
double | time_u () const |
Get elapsed time in microseconds. | |
double | time_n () const |
Get elapsed time in nanoseconds. | |
double | delta_s (Timer_t t1, Timer_t t2) const |
Get the time in seconds between timer ticks t1 and t2. | |
double | delta_m (Timer_t t1, Timer_t t2) const |
Get the time in milliseconds between timer ticks t1 and t2. | |
double | delta_u (Timer_t t1, Timer_t t2) const |
Get the time in microseconds between timer ticks t1 and t2. | |
double | delta_n (Timer_t t1, Timer_t t2) const |
Get the time in nanoseconds between timer ticks t1 and t2. | |
double | getSecondsPerTick () const |
Get the number of seconds per tick. |
Static Public Member Functions | |
static Timer * | instance () |
Protected Attributes | |
Timer_t | _startTick |
double | _secsPerTick |
Timer class is used for measuring elapsed time or time between two points.
osg::Timer::Timer | ( | ) |
Referenced by instance().
|
inline |
Get the time in seconds between timer ticks t1 and t2.
References _secsPerTick.
Referenced by delta_m(), delta_n(), delta_u(), osg::State::getGpuTime(), osgGA::EventQueue::getTime(), osg::GraphicsContext::getTimeSinceLastClear(), and time_s().
|
inline |
Get the number of seconds per tick.
References _secsPerTick.
|
inline |
References _startTick.
|
static |
References Timer().
Referenced by osg::State::getGpuTime(), osgGA::EventQueue::getTime(), osg::GraphicsContext::getTimeSinceLastClear(), and osg::ElapsedTime::init().
|
inline |
Set the start.
References _startTick, and tick().
|
inline |
References _startTick.
Timer_t osg::Timer::tick | ( | ) | const |
Get the timers tick value.
Referenced by setStartTick(), time_m(), time_n(), time_s(), and time_u().
|
inline |
Get elapsed time in milliseconds.
References _startTick, delta_m(), and tick().
|
inline |
Get elapsed time in nanoseconds.
References _startTick, delta_n(), and tick().
|
inline |
Get elapsed time in seconds.
References _startTick, delta_s(), and tick().
|
inline |
Get elapsed time in microseconds.
References _startTick, delta_u(), and tick().
|
protected |
Referenced by delta_s(), and getSecondsPerTick().
|
protected |
Referenced by getStartTick(), setStartTick(), setStartTick(), time_m(), time_n(), time_s(), and time_u().
![]() | Generated at Sun Jul 20 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0. |