Bench-MR
A Motion Planning Benchmark for Wheeled Mobile Robots
Public Member Functions | Protected Attributes | List of all members
Stopwatch Class Reference

Stopwatch implementation to measure elapsed time. More...

#include <Stopwatch.hpp>

Inheritance diagram for Stopwatch:
Inheritance graph
[legend]

Public Member Functions

void start ()
 Starts the timer. More...
 
void reset ()
 Stops the timer and sets elapsed time to zero. More...
 
double stop ()
 Stops the timer. More...
 
double elapsed () const
 Elapsed time in seconds. More...
 
void resume ()
 Continues the stop watch from when it was stopped. More...
 

Protected Attributes

double elapsed_ {0}
 
bool running_ {false}
 

Detailed Description

Stopwatch implementation to measure elapsed time.

Member Function Documentation

◆ elapsed()

double Stopwatch::elapsed ( ) const
inline

Elapsed time in seconds.

◆ reset()

void Stopwatch::reset ( )
inline

Stops the timer and sets elapsed time to zero.

◆ resume()

void Stopwatch::resume ( )
inline

Continues the stop watch from when it was stopped.

◆ start()

void Stopwatch::start ( )
inline

Starts the timer.

◆ stop()

double Stopwatch::stop ( )
inline

Stops the timer.

Returns
Elapsed time in seconds.

Member Data Documentation

◆ elapsed_

double Stopwatch::elapsed_ {0}
protected

◆ running_

bool Stopwatch::running_ {false}
protected

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