OpenWalnut
1.4.0
|
Base class for timing. More...
#include <WTimer.h>
Public Types | |
typedef boost::shared_ptr< WTimer > | SPtr |
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. |
Base class for timing.
Derive from it to write several timers like a frame-timer or realtime-timer.
typedef boost::shared_ptr< const WTimer > WTimer::ConstSPtr |
Convenience typedef for a const shared_ptr.
Reimplemented in WRealtimeTimer, and WGEAnimationFrameTimer.
typedef boost::shared_ptr< WTimer > WTimer::SPtr |
Convenience typedef for a shared_ptr.
Reimplemented in WRealtimeTimer, and WGEAnimationFrameTimer.
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.
virtual double WTimer::elapsed | ( | ) | const [pure virtual] |
Returns the elapsed time since the last reset in seconds with milliseconds precision.
Implemented in WRealtimeTimer, and WGEAnimationFrameTimer.
virtual void WTimer::reset | ( | ) | [pure virtual] |
Resets the start-tick.
Implemented in WRealtimeTimer, and WGEAnimationFrameTimer.