Tesseract 0.28.4
Loading...
Searching...
No Matches
tesseract::common::Stopwatch Class Reference

A simple stopwatch class leveraging chrono high resolution clock. More...

#include <stopwatch.h>

Public Member Functions

void start ()
 Start the timer.
void stop ()
 Stop the timer.
double elapsedMilliseconds () const
 Get the elapsed time in milliseconds.
double elapsedSeconds () const
 Get the elapsed time in seconds.

Detailed Description

A simple stopwatch class leveraging chrono high resolution clock.

Member Function Documentation

◆ elapsedMilliseconds()

double tesseract::common::Stopwatch::elapsedMilliseconds ( ) const

Get the elapsed time in milliseconds.

If timer is actively running it will use Clock::now() as the end time

Returns
The elapsed time in milliseconds

◆ elapsedSeconds()

double tesseract::common::Stopwatch::elapsedSeconds ( ) const

Get the elapsed time in seconds.

If timer is actively running it will use Clock::now() as the end time

Returns
The elapsed time in seconds