OTB  7.2.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
otb::Stopwatch Class Referencefinal

#include <otbStopwatch.h>

Public Types

typedef uint64_t DurationType
typedef Stopwatch Self

Public Member Functions

void GetElapsedHumanReadableTime (std::ostream &oss) const
std::string GetElapsedHumanReadableTime () const
DurationType GetElapsedMilliseconds () const
bool IsRunning () const
void Reset ()
void Restart ()
void Start ()
void Stop ()
 Stopwatch ()

Static Public Member Functions

static Stopwatch StartNew ()

Private Types

typedef uint64_t TimepointType

Private Member Functions

DurationType GetRunningElapsedTime () const
TimepointType GetTimestamp () const

Private Attributes

DurationType m_ElapsedMilliseconds
bool m_IsRunning
TimepointType m_StartTime

Detailed Description

Stopwatch timer.

A simple class for measuring elapsed time.

Definition at line 41 of file otbStopwatch.h.

Member Typedef Documentation

◆ DurationType

typedef uint64_t otb::Stopwatch::DurationType

Represents a duration measured in milliseconds

Definition at line 48 of file otbStopwatch.h.

◆ Self

Standard class typedefs.

Definition at line 45 of file otbStopwatch.h.

◆ TimepointType

typedef uint64_t otb::Stopwatch::TimepointType

Definition at line 82 of file otbStopwatch.h.

Constructor & Destructor Documentation

◆ Stopwatch()

otb::Stopwatch::Stopwatch ( )

Constructs a timer instance

Member Function Documentation

◆ GetElapsedHumanReadableTime() [1/2]

void otb::Stopwatch::GetElapsedHumanReadableTime ( std::ostream &  oss) const

Get the total duration in human readable format (ostream version)

◆ GetElapsedHumanReadableTime() [2/2]

std::string otb::Stopwatch::GetElapsedHumanReadableTime ( ) const

Get the total duration in human readable format

◆ GetElapsedMilliseconds()

DurationType otb::Stopwatch::GetElapsedMilliseconds ( ) const

◆ GetRunningElapsedTime()

DurationType otb::Stopwatch::GetRunningElapsedTime ( ) const

◆ GetTimestamp()

TimepointType otb::Stopwatch::GetTimestamp ( ) const

◆ IsRunning()

bool otb::Stopwatch::IsRunning ( ) const

Returns whether the stopwatch is running

◆ Reset()

void otb::Stopwatch::Reset ( )

Reset the timer

◆ Restart()

void otb::Stopwatch::Restart ( )

◆ Start()

void otb::Stopwatch::Start ( )

Start the timer if not already running

◆ StartNew()

static Stopwatch otb::Stopwatch::StartNew ( )

◆ Stop()

void otb::Stopwatch::Stop ( )

Member Data Documentation

◆ m_ElapsedMilliseconds

DurationType otb::Stopwatch::m_ElapsedMilliseconds

Definition at line 88 of file otbStopwatch.h.

◆ m_IsRunning

bool otb::Stopwatch::m_IsRunning

Definition at line 89 of file otbStopwatch.h.

◆ m_StartTime

TimepointType otb::Stopwatch::m_StartTime

Definition at line 87 of file otbStopwatch.h.

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