Public Member Functions | Static Public Member Functions | Protected Attributes
MAKLogger::DtAbsoluteTime Class Reference

Absolute Time, a particular measured instance in time, could be thought of as a set of relative times which are all relative to a shared time (usually 0). More...

+ Collaboration diagram for MAKLogger::DtAbsoluteTime:

List of all members.

Public Member Functions

 DtAbsoluteTime (double absTime)
 Initialize absolute time to double time value.
void offset (const DtRelativeTime &relTime)
 Offset absolute time, by relative time amount.
DtRelativeTime relative (const DtAbsoluteTime &time2) const
 calculate relative time between time2 and this time, via time2 - this
DtAbsoluteTime operator+ (const DtRelativeTime &relTime) const
 Offset time by relative time, using + and - operators.
DtAbsoluteTime operator- (const DtRelativeTime &relTime) const
DtAbsoluteTimeoperator+= (const DtRelativeTime &relTime)
DtAbsoluteTimeoperator-= (const DtRelativeTime &relTime)
DtRelativeTime operator- (const DtAbsoluteTime &absTime) const
bool operator== (const DtAbsoluteTime &) const
 Check if time are the same.
bool operator!= (const DtAbsoluteTime &) const
bool operator< (const DtAbsoluteTime &) const
bool operator> (const DtAbsoluteTime &) const
bool operator<= (const DtAbsoluteTime &) const
bool operator>= (const DtAbsoluteTime &) const
double hours () const
 Get the time in hours.
double minutes () const
 Get the time in minutes.
double seconds () const
 Get the time in seconds.
long hourPart () const
 Get just the hours (0-...)
long minutePart () const
 Get just the minutes (0-59)
long secondPart () const
 Get just the second part (0-59)
long milisecondPart () const
 Get just the milisecond part (0 - 999)
DtString toString (int percision=0) const
 Creates.

Static Public Member Functions

static double parseString (const DtString &timeString)
 Parses a string to a double.

Protected Attributes

double myTime

Detailed Description

Absolute Time, a particular measured instance in time, could be thought of as a set of relative times which are all relative to a shared time (usually 0).


Constructor & Destructor Documentation

MAKLogger::DtAbsoluteTime::DtAbsoluteTime ( double  absTime)

Initialize absolute time to double time value.

Exceptions:
DtCorruptedStateif time is negative.

Member Function Documentation

double MAKLogger::DtAbsoluteTime::hours ( ) const

Get the time in hours.

Warning:
value returned contains fractional hour time.
double MAKLogger::DtAbsoluteTime::minutes ( ) const

Get the time in minutes.

Warning:
value returned contains fractional minute time.
DtAbsoluteTime MAKLogger::DtAbsoluteTime::operator+ ( const DtRelativeTime relTime) const

Offset time by relative time, using + and - operators.

Exceptions:
DtCorruptedStateif time is negative.
DtAbsoluteTime& MAKLogger::DtAbsoluteTime::operator+= ( const DtRelativeTime relTime)
Exceptions:
DtCorruptedStateif time is negative.
DtAbsoluteTime MAKLogger::DtAbsoluteTime::operator- ( const DtRelativeTime relTime) const
Exceptions:
DtCorruptedStateif time is negative.
DtAbsoluteTime& MAKLogger::DtAbsoluteTime::operator-= ( const DtRelativeTime relTime)
Exceptions:
DtCorruptedStateif time is negative.
static double MAKLogger::DtAbsoluteTime::parseString ( const DtString &  timeString) [static]

Parses a string to a double.

Value is a double rather than an absolute time since absolute time may not be negative.

Exceptions:
DtInvalidInputif timeString is not formatted correctly.
DtCorruptedStateif time is negative.
double MAKLogger::DtAbsoluteTime::seconds ( ) const

Get the time in seconds.

Warning:
value returned contains fractional second time.

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

Document ID: Generated on Tue Oct 11 19:41:03 EDT 2011 from SVN revision 107422
Copyright © 2005-2011 VT MÄK Inc. All Rights Reserved (www.mak.com)