PPL API Reference
Overview Core Algorithm Abstractions Utilities Parallel Methods
Modules Class Hierarchy Classes Functions
Todo List Bug List Dead Code
List of all members
ClockClass Class Reference

Public Member Functions

Construction
 ClockClass ()
 
Interface
void SetName (const std::string &_name)
 
void ClearClock ()
 Reset the clock.
 
void StartClock ()
 
void StopClock ()
 
void StopPrintClock (std::ostream &_os)
 Call StopClock and PrintClock.
 
void PrintClock (std::ostream &_os)
 
double GetSeconds () const
 Get the recorded time in seconds.
 
double GetUSeconds () const
 Get the recorded time in microseconds.
 

Detailed Description

This class is used to measure the processor time used between StartClock and StopClock calls. This includes both user and system time.

Note
Instances of this class are not thread-safe and should only be used by a single thread. It is safe to run separate instances in different threads.

Member Function Documentation

◆ SetName()

void ClockClass::SetName ( const std::string &  _name)

Set the clock name.

Parameters
_nameThe name to use.

◆ StartClock()

void ClockClass::StartClock ( )

Start the clock and the name is identity of this clock.

Exceptions
Ifthe clock is already started.

◆ StopClock()

void ClockClass::StopClock ( )

Stop the clock and calculate the total running time.

Exceptions
Ifthe clock is already stopped.

◆ PrintClock()

void ClockClass::PrintClock ( std::ostream &  _os)

Print clock name and time in seconds to an outstream.

Parameters
_osThe outstream to print to.

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