Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
Clock Class Reference

Millisecond clock. More...

#include <Clock.h>

List of all members.

Public Member Functions

unsigned int getTimestamp ()
std::string getTimeString ()
std::string getTimeString (unsigned timestamp)
virtual ~Clock ()

Static Public Member Functions

static std::string getFilenameDateString ()
static ClockgetInstance ()

Private Member Functions

 Clock ()

Private Attributes

timeval m_StartTime

Static Private Attributes

static Clockinstance = 0

Detailed Description

Millisecond clock.

Author:
(R5) This class provides a clock with millisecond accuracy. It is implemented as a singleton. The timestamps returned by the method getTimestamp are relative to the creation time of the first instance of this class.

Definition at line 30 of file Clock.h.


Constructor & Destructor Documentation

Clock::~Clock ( ) [virtual]

Destructor

Definition at line 106 of file Clock.cpp.

Clock::Clock ( ) [private]

Private default Constructor (-->Singleton)

Definition at line 32 of file Clock.cpp.


Member Function Documentation

std::string Clock::getFilenameDateString ( ) [static]
Returns:
String containing filename-compatible date string

Definition at line 78 of file Clock.cpp.

Clock * Clock::getInstance ( ) [static]

Returns instance of the singleton

Returns:
instance of the singleton

Definition at line 22 of file Clock.cpp.

unsigned int Clock::getTimestamp ( )

Returns timestamp in ms (milliseconds) since the first instance of clock has been created

Returns:
timestamp in ms

Definition at line 38 of file Clock.cpp.

std::string Clock::getTimeString ( )

Returns timestamp in ms (milliseconds) since the first instance of clock has been created

Returns:
timestamp in ms

Definition at line 73 of file Clock.cpp.

std::string Clock::getTimeString ( unsigned  timestamp)

Definition at line 48 of file Clock.cpp.


Member Data Documentation

Clock * Clock::instance = 0 [static, private]

Single instance of the clock

Definition at line 72 of file Clock.h.

timeval Clock::m_StartTime [private]

Creation of the clock

Definition at line 77 of file Clock.h.


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


robbie_architecture
Author(s): Viktor Seib
autogenerated on Mon Oct 6 2014 02:53:09