parallel-cellular-automata
Framework for building parallel cellular automata.
Public Member Functions | Protected Attributes | List of all members
UTimer Class Reference

RAII Timer that prints on cout the time elapsed since its creation and a message. The time is measured in microseconds. More...

#include <utimer.hpp>

Public Member Functions

 UTimer (const std::string m)
 Construct a new UTimer object. More...
 
 UTimer (const std::string m, long *us)
 Construct a new UTimer object. When the object is destroied inserts in *us the microseconds elapsed since the creation. More...
 
 ~UTimer ()
 Destroy the UTimer object and print the message containing the elapsed time.
 

Protected Attributes

long * us_elapsed
 

Detailed Description

RAII Timer that prints on cout the time elapsed since its creation and a message. The time is measured in microseconds.

Constructor & Destructor Documentation

◆ UTimer() [1/2]

UTimer::UTimer ( const std::string  m)

Construct a new UTimer object.

Parameters
mMessage describing what is being computed.

◆ UTimer() [2/2]

UTimer::UTimer ( const std::string  m,
long *  us 
)

Construct a new UTimer object. When the object is destroied inserts in *us the microseconds elapsed since the creation.

Parameters
mMessage describing what is being computed.
usPointer to variable in which to put the elapsed microsecond.

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