OpenWalnut  1.4.0
Public Types | Public Member Functions | Private Attributes | List of all members
WRealtimeTimer Class Reference

Realtime timing. More...

#include <WRealtimeTimer.h>

+ Inheritance diagram for WRealtimeTimer:

Public Types

typedef boost::shared_ptr
< WRealtimeTimer
SPtr
 Convenience typedef for a shared_ptr.
typedef boost::shared_ptr
< const WRealtimeTimer
ConstSPtr
 Convenience typedef for a const shared_ptr.
- Public Types inherited from WTimer
typedef boost::shared_ptr< WTimerSPtr
 Convenience typedef for a shared_ptr.
typedef boost::shared_ptr
< const WTimer
ConstSPtr
 Convenience typedef for a const shared_ptr.

Public Member Functions

 WRealtimeTimer ()
 Constructs a realtime animation timer.
virtual ~WRealtimeTimer ()
 Destructor.
virtual void reset ()
 Resets the start-tick.
virtual double elapsed () const
 Returns the elapsed time since the last reset in seconds with milliseconds precision.
- Public Member Functions inherited from WTimer
 WTimer ()
 Constructs a animation timer.
virtual ~WTimer ()
 Destructor.

Private Attributes

osg::Timer m_timer
 The osg timer is used here.

Detailed Description

Realtime timing.

Internally, this uses an osg::Timer.

Definition at line 39 of file WRealtimeTimer.h.

Member Typedef Documentation

typedef boost::shared_ptr< const WRealtimeTimer > WRealtimeTimer::ConstSPtr

Convenience typedef for a const shared_ptr.

Definition at line 50 of file WRealtimeTimer.h.

typedef boost::shared_ptr< WRealtimeTimer > WRealtimeTimer::SPtr

Convenience typedef for a shared_ptr.

Definition at line 45 of file WRealtimeTimer.h.

Constructor & Destructor Documentation

WRealtimeTimer::WRealtimeTimer ( )

Constructs a realtime animation timer.

Definition at line 27 of file WRealtimeTimer.cpp.

WRealtimeTimer::~WRealtimeTimer ( )
virtual

Destructor.

Definition at line 34 of file WRealtimeTimer.cpp.

Member Function Documentation

double WRealtimeTimer::elapsed ( ) const
virtual

Returns the elapsed time since the last reset in seconds with milliseconds precision.

Returns
elapsed time in seconds with millisecond precision.

Implements WTimer.

Definition at line 44 of file WRealtimeTimer.cpp.

References m_timer.

void WRealtimeTimer::reset ( )
virtual

Resets the start-tick.

Implements WTimer.

Definition at line 39 of file WRealtimeTimer.cpp.

References m_timer.

Member Data Documentation

osg::Timer WRealtimeTimer::m_timer
private

The osg timer is used here.

Definition at line 78 of file WRealtimeTimer.h.

Referenced by elapsed(), and reset().


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