fw4spl
fwCore::HiResTimer Class Reference

This class provide a timer (stopwatch). HiResTimer is able to measure the elapsed time with a few micro-seconds. accuracy, on Linux, Mac OS and Windows. More...

#include <HiResTimer.hpp>

+ Inheritance diagram for fwCore::HiResTimer:
+ Collaboration diagram for fwCore::HiResTimer:

Public Member Functions

virtual bool isA (const std::string &type) const override
 
FWCORE_API void start ()
 Start the timer.
 
FWCORE_API void stop ()
 Stop the timer. stop() will not reset the timer.
 
FWCORE_API void reset (::fwCore::HiResClock::HiResClockType initial_value=0.)
 Reset the timer and leave it in the same state it was (started or stopped). More...
 
Constructor/Destructor
FWCORE_API HiResTimer ()
 
virtual FWCORE_API ~HiResTimer ()
 
Elapsed time

These methods return the cumulated elapsed running time of the timer the timer is running when start() has been invoked and stop running on stop() or reset() invokation.

FWCORE_API::fwCore::HiResClock::HiResClockType getElapsedTimeInSec ()
 
FWCORE_API::fwCore::HiResClock::HiResClockType getElapsedTimeInMilliSec ()
 
FWCORE_API::fwCore::HiResClock::HiResClockType getElapsedTimeInMicroSec ()
 
- Public Member Functions inherited from fwCore::BaseObject

Static Public Member Functions

static bool isTypeOf (const std::string &type)
 
- Static Public Member Functions inherited from fwCore::BaseObject
static bool isTypeOf (const std::string &type)
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 

Friends

template<class , class , class >
class ::fwTools::ClassFactory
 
class ::fwTools::Factory
 

Demangling methods

virtual const std::string & getLeafClassname () const override
 return object's classname without its namespace, i.e. BaseObject
 
virtual const std::string & getClassname () const override
 return full object's classname with its namespace, i.e. fwCore::BaseObject
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 

Detailed Description

This class provide a timer (stopwatch). HiResTimer is able to measure the elapsed time with a few micro-seconds. accuracy, on Linux, Mac OS and Windows.

Definition at line 28 of file HiResTimer.hpp.

Member Function Documentation

fwCore::HiResClock::HiResClockType fwCore::HiResTimer::getElapsedTimeInMicroSec ( )
Returns
Elapsed time in microseconds

Definition at line 55 of file HiResTimer.cpp.

Referenced by getElapsedTimeInMilliSec(), and getElapsedTimeInSec().

+ Here is the caller graph for this function:

fwCore::HiResClock::HiResClockType fwCore::HiResTimer::getElapsedTimeInMilliSec ( )
Returns
Elapsed time in milliseconds

Definition at line 66 of file HiResTimer.cpp.

References getElapsedTimeInMicroSec().

Referenced by vtkSimpleMesh::SSimpleMeshDeformation::updating(), and vtkGdcmIO::SeriesDBLazyReader::~SeriesDBLazyReader().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

fwCore::HiResClock::HiResClockType fwCore::HiResTimer::getElapsedTimeInSec ( )
Returns
Elapsed time in seconds

Definition at line 72 of file HiResTimer.cpp.

References getElapsedTimeInMicroSec().

+ Here is the call graph for this function:

void fwCore::HiResTimer::reset ( ::fwCore::HiResClock::HiResClockType  initial_value = 0.)

Reset the timer and leave it in the same state it was (started or stopped).

Parameters
initial_valueInitial value in microseconds from which the timer will start to count.

Definition at line 39 of file HiResTimer.cpp.

References start(), and stop().

Referenced by vtkSimpleMesh::SSimpleMeshDeformation::updating().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


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