spot 2.16
Loading...
Searching...
No Matches
Public Member Functions | Protected Types | Protected Attributes | List of all members
spot::stopwatch Struct Reference

A simple stopwatch. More...

#include <spot/misc/timer.hh>

Collaboration diagram for spot::stopwatch:

Public Member Functions

void start ()
 Marks the start of the measurement.
 
double stop ()
 Returns the elapsed duration in seconds.
 

Protected Types

typedef std::chrono::steady_clock clock
 Clock type used by the stopwatch.
 

Protected Attributes

clock::time_point start_
 Recorded start time point.
 

Detailed Description

A simple stopwatch.

Member Typedef Documentation

◆ clock

typedef std::chrono::steady_clock spot::stopwatch::clock
protected

Clock type used by the stopwatch.

Member Function Documentation

◆ start()

void spot::stopwatch::start ( )
inline

Marks the start of the measurement.

References start_.

Referenced by spot::process_timer::start().

◆ stop()

double spot::stopwatch::stop ( )
inline

Returns the elapsed duration in seconds.

May be called multiple times, and will always return the duration since the last call to start().

References start_.

Referenced by spot::process_timer::stop().

Member Data Documentation

◆ start_

clock::time_point spot::stopwatch::start_
protected

Recorded start time point.

Referenced by start(), and stop().


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

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Fri Feb 27 2015 10:00:07 for spot by doxygen 1.9.8