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

Realtime timing. More...

#include <WRealtimeTimer.h>

+ Inheritance diagram for WRealtimeTimer:
+ Collaboration diagram for WRealtimeTimer:

Public Types

typedef std::shared_ptr< WRealtimeTimerSPtr
 Convenience typedef for a shared_ptr. More...
 
typedef std::shared_ptr< const WRealtimeTimerConstSPtr
 Convenience typedef for a const shared_ptr. More...
 
- Public Types inherited from WTimer
typedef std::shared_ptr< WTimerSPtr
 Convenience typedef for a shared_ptr. More...
 
typedef std::shared_ptr< const WTimerConstSPtr
 Convenience typedef for a const shared_ptr. More...
 

Public Member Functions

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

Private Attributes

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

Detailed Description

Realtime timing.

Internally, this uses an osg::Timer.

Definition at line 39 of file WRealtimeTimer.h.

Member Typedef Documentation

◆ ConstSPtr

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

Convenience typedef for a const shared_ptr.

Definition at line 50 of file WRealtimeTimer.h.

◆ SPtr

typedef std::shared_ptr< WRealtimeTimer > WRealtimeTimer::SPtr

Convenience typedef for a shared_ptr.

Definition at line 45 of file WRealtimeTimer.h.

Constructor & Destructor Documentation

◆ WRealtimeTimer()

WRealtimeTimer::WRealtimeTimer ( )

Constructs a realtime animation timer.

Definition at line 27 of file WRealtimeTimer.cpp.

◆ ~WRealtimeTimer()

WRealtimeTimer::~WRealtimeTimer ( )
virtual

Destructor.

Definition at line 34 of file WRealtimeTimer.cpp.

Member Function Documentation

◆ elapsed()

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.

◆ reset()

void WRealtimeTimer::reset ( )
virtual

Resets the start-tick.

Implements WTimer.

Definition at line 39 of file WRealtimeTimer.cpp.

References m_timer.

Member Data Documentation

◆ m_timer

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: