VPTissue Reference Manual
SimPT_Sim::ClockMan::Stopwatch< T > Class Template Reference

Provides a stopwatch interface to time: it accumulates time between start/stop pairs. More...

#include <Stopwatch.h>

Collaboration diagram for SimPT_Sim::ClockMan::Stopwatch< T >:
Collaboration graph

Public Types

typedef T TClock
 

Public Member Functions

 Stopwatch (std::string name="stopwatch", bool running=false)
 Constructor initializes stopwatch.
 
T::duration Get () const
 Returns the accumulated value without altering the stopwatch state.
 
std::string GetName () const
 Return name of this stopwatch.
 
bool IsRunning () const
 Reports whether stopwatch has been started.
 
StopwatchReset ()
 Resets stopwatch i.e. stopwatch is stopped and time accumulator is cleared.
 
StopwatchStart ()
 Starts stopwatch if it was stopped.
 
StopwatchStop ()
 Stops the stopwatch if it was running.
 
std::string ToString () const
 Returns string representation of readout.
 

Detailed Description

template<typename T = std::chrono::system_clock>
class SimPT_Sim::ClockMan::Stopwatch< T >

Provides a stopwatch interface to time: it accumulates time between start/stop pairs.

Definition at line 39 of file Stopwatch.h.


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