Drake
Drake C++ Documentation
SteadyTimer Class Referencefinal

Detailed Description

Implementation of timing utility that uses monotonic std::chrono::steady_clock.

#include <drake/common/timer.h>

Public Member Functions

 SteadyTimer ()
 
void Start () final
 Begins timing. Call Start everytime you want to reset the timer to zero. More...
 
double Tick () final
 Obtains a timer measurement in seconds. More...
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 SteadyTimer (const SteadyTimer &)=default
 
SteadyTimeroperator= (const SteadyTimer &)=default
 
 SteadyTimer (SteadyTimer &&)=default
 
SteadyTimeroperator= (SteadyTimer &&)=default
 
- Public Member Functions inherited from Timer
 Timer ()=default
 Properly implemented Timers must start timing upon construction. More...
 
virtual ~Timer ()=default
 

Additional Inherited Members

- Protected Member Functions inherited from Timer
 Timer (const Timer &)=default
 
Timeroperator= (const Timer &)=default
 
 Timer (Timer &&)=default
 
Timeroperator= (Timer &&)=default
 

Constructor & Destructor Documentation

◆ SteadyTimer() [1/3]

SteadyTimer ( const SteadyTimer )
default

◆ SteadyTimer() [2/3]

SteadyTimer ( SteadyTimer &&  )
default

◆ SteadyTimer() [3/3]

Member Function Documentation

◆ operator=() [1/2]

SteadyTimer& operator= ( const SteadyTimer )
default

◆ operator=() [2/2]

SteadyTimer& operator= ( SteadyTimer &&  )
default

◆ Start()

void Start ( )
finalvirtual

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

Implements Timer.

◆ Tick()

double Tick ( )
finalvirtual

Obtains a timer measurement in seconds.

Call this repeatedly to get multiple measurements.

Returns
the amount of time since the timer started.

Implements Timer.


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