Drake
Drake C++ Documentation
Timer Class Referenceabstract

Detailed Description

Abstract base class for timing utility.

#include <drake/common/timer.h>

Public Member Functions

 Timer ()=default
 Properly implemented Timers must start timing upon construction. More...
 
virtual ~Timer ()
 
virtual void Start ()=0
 Begins timing. Call Start every time you want to reset the timer to zero. More...
 
virtual double Tick ()=0
 Obtains a timer measurement in seconds. More...
 

Protected Member Functions

Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 Timer (const Timer &)=default
 
Timeroperator= (const Timer &)=default
 
 Timer (Timer &&)=default
 
Timeroperator= (Timer &&)=default
 

Constructor & Destructor Documentation

◆ Timer() [1/3]

Timer ( )
default

Properly implemented Timers must start timing upon construction.

◆ ~Timer()

virtual ~Timer ( )
virtual

◆ Timer() [2/3]

Timer ( const Timer )
protecteddefault

◆ Timer() [3/3]

Timer ( Timer &&  )
protecteddefault

Member Function Documentation

◆ operator=() [1/2]

Timer& operator= ( const Timer )
protecteddefault

◆ operator=() [2/2]

Timer& operator= ( Timer &&  )
protecteddefault

◆ Start()

virtual void Start ( )
pure virtual

Begins timing. Call Start every time you want to reset the timer to zero.

Implemented in ManualTimer, and SteadyTimer.

◆ Tick()

virtual double Tick ( )
pure virtual

Obtains a timer measurement in seconds.

Call this repeatedly to get multiple measurements.

Returns
the amount of time since the timer started.

Implemented in ManualTimer, and SteadyTimer.


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