version 3.3

VRS::VRSTime Class Reference

AM VRSTime Data Type describing relative time spans. More...

#include <vrs/time.h>

List of all members.

Public Member Functions

 VRSTime (double seconds=0.0)
 A time specified in seconds using a double value.
 VRSTime (double millisec, double sec, double min, double hours)
 A time specified by hours, minutes, seconds and milliseconds seperately.
 operator double () const
 The operators using `double' are for convenience.
double millisec () const
 Returns the time represented in milliseconds.
double seconds () const
 Returns the time represented in seconds.
double minutes () const
 Returns the time represented in minutes.
double hours () const
 Returns the time represented in hours.
VRSTimeoperator+= (double secs)
 Operator that adds seconds 'secs' to the VRSTime object.
VRSTimeoperator-= (double secs)
 Operator that subtracts seconds 'secs' from the VRSTime object.
 VRS_SERIALIZABLE_NO_SO_CLASS (VRSTime)

Static Public Member Functions

static const VRSTimemaxTime ()
 Unique constant describing the highest time value possible.
static const VRSTimezero ()
 Unique constant describing the lowest (positive) time value possible.
static VRSTime now ()
 Returns the current time.
static std::string currentDateTimeString ()
 Returns a simple string including current date and time The output has the format 'Wed Jan 02 02:03:55 1980'.


Detailed Description

AM VRSTime Data Type describing relative time spans.

It is useful for measuring time spans during runtime, but it also contains static methods that abstract from the underlying operating system.


Constructor & Destructor Documentation

VRS::VRSTime::VRSTime ( double  seconds = 0.0  ) 

A time specified in seconds using a double value.

VRS::VRSTime::VRSTime ( double  millisec,
double  sec,
double  min,
double  hours 
)

A time specified by hours, minutes, seconds and milliseconds seperately.


Member Function Documentation

VRS::VRSTime::operator double (  )  const

The operators using `double' are for convenience.

double VRS::VRSTime::millisec (  )  const

Returns the time represented in milliseconds.

double VRS::VRSTime::seconds (  )  const

Returns the time represented in seconds.

double VRS::VRSTime::minutes (  )  const

Returns the time represented in minutes.

double VRS::VRSTime::hours (  )  const

Returns the time represented in hours.

static const VRSTime& VRS::VRSTime::maxTime (  )  [static]

Unique constant describing the highest time value possible.

static const VRSTime& VRS::VRSTime::zero (  )  [static]

Unique constant describing the lowest (positive) time value possible.

static VRSTime VRS::VRSTime::now (  )  [static]

Returns the current time.

static std::string VRS::VRSTime::currentDateTimeString (  )  [static]

Returns a simple string including current date and time The output has the format 'Wed Jan 02 02:03:55 1980'.

VRSTime& VRS::VRSTime::operator+= ( double  secs  ) 

Operator that adds seconds 'secs' to the VRSTime object.

VRSTime& VRS::VRSTime::operator-= ( double  secs  ) 

Operator that subtracts seconds 'secs' from the VRSTime object.

VRS::VRSTime::VRS_SERIALIZABLE_NO_SO_CLASS ( VRSTime   ) 


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

Generated on Mon May 20 06:00:39 2013 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact