OpenWalnut  1.4.0
Public Types | Public Member Functions | Private Attributes
WRealtimeTimer Class Reference

Realtime timing. More...

#include <WRealtimeTimer.h>

+ Inheritance diagram for WRealtimeTimer:

List of all members.

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 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.

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.

Reimplemented from WTimer.

Definition at line 50 of file WRealtimeTimer.h.

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

Convenience typedef for a shared_ptr.

Reimplemented from WTimer.

Definition at line 45 of file WRealtimeTimer.h.


Constructor & Destructor Documentation

Constructs a realtime animation timer.

Definition at line 27 of file WRealtimeTimer.cpp.

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: