Public Member Functions | Private Attributes

lssr::Timestamp Class Reference

A helper class for automated time stamping. Timing is started as soon as an object of this class is created. To time some parts of a program, just create a new object and use the provided output operator to display the elapsed time. More...

#include <Timestamp.hpp>

List of all members.

Public Member Functions

 Timestamp ()
 Constructor.
unsigned long getCurrentTimeInMs () const
 Returns the current system time in milliseconds.
unsigned long getElapsedTimeInMs () const
 Returns the milliseconds since object creation.
double getCurrentTimeinS () const
 Returns the current system time in seconds.
double getElapsedTimeInS () const
 Returns the time since instantiation in seconds.
void resetTimer ()
 Resets the internal timer.
string getElapsedTime () const
 Returns a string representation of the current timer value.

Private Attributes

unsigned long m_startTime
 The system at object instantiation.

Detailed Description

A helper class for automated time stamping. Timing is started as soon as an object of this class is created. To time some parts of a program, just create a new object and use the provided output operator to display the elapsed time.

Definition at line 26 of file Timestamp.hpp.


Constructor & Destructor Documentation

lssr::Timestamp::Timestamp (  ) 

Constructor.

Definition at line 21 of file Timestamp.cpp.

Here is the call graph for this function:


Member Function Documentation

unsigned long lssr::Timestamp::getCurrentTimeInMs (  )  const

Returns the current system time in milliseconds.

Definition at line 27 of file Timestamp.cpp.

Here is the caller graph for this function:

double lssr::Timestamp::getCurrentTimeinS (  )  const

Returns the current system time in seconds.

Definition at line 41 of file Timestamp.cpp.

Here is the call graph for this function:

string lssr::Timestamp::getElapsedTime (  )  const

Returns a string representation of the current timer value.

Definition at line 56 of file Timestamp.cpp.

Here is the call graph for this function:

unsigned long lssr::Timestamp::getElapsedTimeInMs (  )  const

Returns the milliseconds since object creation.

Definition at line 36 of file Timestamp.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

double lssr::Timestamp::getElapsedTimeInS (  )  const

Returns the time since instantiation in seconds.

Definition at line 46 of file Timestamp.cpp.

Here is the call graph for this function:

void lssr::Timestamp::resetTimer (  ) 

Resets the internal timer.

Definition at line 51 of file Timestamp.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

unsigned long lssr::Timestamp::m_startTime [private]

The system at object instantiation.

Definition at line 69 of file Timestamp.hpp.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Defines