OpenWalnut
1.5.0dev
|
Base class for timing. More...
#include <WTimer.h>
Public Types | |
typedef std::shared_ptr< WTimer > | SPtr |
Convenience typedef for a shared_ptr. More... | |
typedef std::shared_ptr< const WTimer > | ConstSPtr |
Convenience typedef for a const shared_ptr. More... | |
Public Member Functions | |
WTimer () | |
Constructs a animation timer. More... | |
virtual | ~WTimer () |
Destructor. More... | |
virtual void | reset ()=0 |
Resets the start-tick. More... | |
virtual double | elapsed () const =0 |
Returns the elapsed time since the last reset in seconds with milliseconds precision. More... | |
Base class for timing.
Derive from it to write several timers like a frame-timer or realtime-timer.
typedef std::shared_ptr< const WTimer > WTimer::ConstSPtr |
typedef std::shared_ptr< WTimer > WTimer::SPtr |
WTimer::WTimer | ( | ) |
Constructs a animation timer.
Definition at line 27 of file WTimer.cpp.
|
virtual |
Destructor.
Definition at line 32 of file WTimer.cpp.
|
pure virtual |
Returns the elapsed time since the last reset in seconds with milliseconds precision.
Implemented in WGEAnimationFrameTimer, and WRealtimeTimer.
|
pure virtual |
Resets the start-tick.
Implemented in WGEAnimationFrameTimer, and WRealtimeTimer.