OpenWalnut  1.5.0dev
Public Types | Public Member Functions | List of all members
WTimer Class Referenceabstract

Base class for timing. More...

#include <WTimer.h>

+ Inheritance diagram for WTimer:

Public Types

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

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

Detailed Description

Base class for timing.

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

Definition at line 36 of file WTimer.h.

Member Typedef Documentation

◆ ConstSPtr

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

Convenience typedef for a const shared_ptr.

Definition at line 47 of file WTimer.h.

◆ SPtr

typedef std::shared_ptr< WTimer > WTimer::SPtr

Convenience typedef for a shared_ptr.

Definition at line 42 of file WTimer.h.

Constructor & Destructor Documentation

◆ WTimer()

WTimer::WTimer ( )

Constructs a animation timer.

Definition at line 27 of file WTimer.cpp.

◆ ~WTimer()

WTimer::~WTimer ( )
virtual

Destructor.

Definition at line 32 of file WTimer.cpp.

Member Function Documentation

◆ elapsed()

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 WGEAnimationFrameTimer, and WRealtimeTimer.

◆ reset()

virtual void WTimer::reset ( )
pure virtual

Resets the start-tick.

Implemented in WGEAnimationFrameTimer, and WRealtimeTimer.


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