OpenMPCD
Public Types | Public Member Functions | List of all members
OpenMPCD::Profiling::Stopwatch Class Reference

Marks a code region. More...

#include <Stopwatch.hpp>

Public Types

typedef boost::chrono::microseconds::rep MicrosecondDuration
 An integral type that represents a duration of time in terms of microseconds. More...
 

Public Member Functions

 Stopwatch ()
 The constructor. More...
 
 ~Stopwatch ()
 The destructor. More...
 
const MicrosecondDuration getElapsedMicroseconds () const
 Returns the number of microseconds that have elapsed since the stopwatch started measuring. More...
 

Detailed Description

Marks a code region.

The marked region starts with the construction of an instance of this class, and ends with its destruction.

Definition at line 21 of file Stopwatch.hpp.

Member Typedef Documentation

◆ MicrosecondDuration

typedef boost::chrono::microseconds::rep OpenMPCD::Profiling::Stopwatch::MicrosecondDuration

An integral type that represents a duration of time in terms of microseconds.

Definition at line 24 of file Stopwatch.hpp.

Constructor & Destructor Documentation

◆ Stopwatch()

OpenMPCD::Profiling::Stopwatch::Stopwatch ( )
inline

The constructor.

Upon construction, the stopwatch starts measuring time.

Definition at line 34 of file Stopwatch.hpp.

◆ ~Stopwatch()

OpenMPCD::Profiling::Stopwatch::~Stopwatch ( )
inline

The destructor.

Definition at line 46 of file Stopwatch.hpp.

Member Function Documentation

◆ getElapsedMicroseconds()

const MicrosecondDuration OpenMPCD::Profiling::Stopwatch::getElapsedMicroseconds ( ) const
inline

Returns the number of microseconds that have elapsed since the stopwatch started measuring.

Definition at line 55 of file Stopwatch.hpp.


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