OTB  6.7.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

Represents a duration measured in milliseconds

Definition at line 48 of file otbStopwatch.h.

Standard class typedefs.

Definition at line 45 of file otbStopwatch.h.

Definition at line 82 of file otbStopwatch.h.

Constructor & Destructor Documentation

otb::Stopwatch::Stopwatch ( )

Constructs a timer instance

Member Function Documentation

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

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

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

Get the total duration in human readable format

DurationType otb::Stopwatch::GetElapsedMilliseconds ( ) const
DurationType otb::Stopwatch::GetRunningElapsedTime ( ) const
private
TimepointType otb::Stopwatch::GetTimestamp ( ) const
private
bool otb::Stopwatch::IsRunning ( ) const

Returns whether the stopwatch is running

void otb::Stopwatch::Reset ( )

Reset the timer

void otb::Stopwatch::Restart ( )
void otb::Stopwatch::Start ( )

Start the timer if not already running

Referenced by otb::SimpleParallelTiffWriter< TInputImage >::Update().

static Stopwatch otb::Stopwatch::StartNew ( )
static
void otb::Stopwatch::Stop ( )

Member Data Documentation

DurationType otb::Stopwatch::m_ElapsedMilliseconds
private

Definition at line 88 of file otbStopwatch.h.

bool otb::Stopwatch::m_IsRunning
private

Definition at line 89 of file otbStopwatch.h.

TimepointType otb::Stopwatch::m_StartTime
private

Definition at line 87 of file otbStopwatch.h.


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