OpenWalnut  1.4.0
Public Types | Public Member Functions | List of all members
WTimer Class Reference

Base class for timing. More...

#include <WTimer.h>

+ Inheritance diagram for WTimer:

Public Types

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

 WTimer ()
 Constructs a animation timer.
virtual ~WTimer ()
 Destructor.
virtual void reset ()=0
 Resets the start-tick.
virtual double elapsed () const =0
 Returns the elapsed time since the last reset in seconds with milliseconds precision.

Detailed Description

Base class for timing.

Derive from it to write several timers like a frame-timer or realtime-timer.

Definition at line 35 of file WTimer.h.

Member Typedef Documentation

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

Convenience typedef for a const shared_ptr.

Definition at line 46 of file WTimer.h.

typedef boost::shared_ptr< WTimer > WTimer::SPtr

Convenience typedef for a shared_ptr.

Definition at line 41 of file WTimer.h.

Constructor & Destructor Documentation

WTimer::WTimer ( )

Constructs a animation timer.

Definition at line 27 of file WTimer.cpp.

WTimer::~WTimer ( )
virtual

Destructor.

Definition at line 32 of file WTimer.cpp.

Member Function Documentation

virtual double WTimer::elapsed ( ) const
pure virtual

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

Returns
elapsed time in seconds with millisecond precision.

Implemented in WRealtimeTimer, and WGEAnimationFrameTimer.

virtual void WTimer::reset ( )
pure virtual

Resets the start-tick.

Implemented in WRealtimeTimer, and WGEAnimationFrameTimer.


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