MAK Data Logger API Documentation for DIS
List of all members | Public Member Functions | Static Public Member Functions | Protected Attributes
MAKLogger::DtRelativeTime Class Reference

Relative Time, an elapsed duration of time, no implied measurement, could be seconds/cycles or ticks etc, relative time, does not indicate what moment it is relative too. More...

+ Collaboration diagram for MAKLogger::DtRelativeTime:

Public Member Functions

 DtRelativeTime (double reltime)
 Initialize relative time to double time value.
 DtRelativeTime (const DtAbsoluteTime &time1, const DtAbsoluteTime &time2)
 Initialize relative time to time2 - time1.
DtRelativeTime operator+ (const DtRelativeTime &relTime) const
 Calculate the sum of the relative times.
DtRelativeTime operator- (const DtRelativeTime &relTime) const
 Calculate the difference of the relative times.
bool operator== (const DtRelativeTime &) const
 Check if time are the same.
bool operator!= (const DtRelativeTime &) const
bool operator< (const DtRelativeTime &) const
bool operator> (const DtRelativeTime &) const
bool operator<= (const DtRelativeTime &) const
bool operator>= (const DtRelativeTime &) const
double hours () const
double minutes () const
double seconds () const
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

Relative Time, an elapsed duration of time, no implied measurement, could be seconds/cycles or ticks etc, relative time, does not indicate what moment it is relative too.

Constructor & Destructor Documentation

MAKLogger::DtRelativeTime::DtRelativeTime ( double  reltime)

Initialize relative time to double time value.

MAKLogger::DtRelativeTime::DtRelativeTime ( const DtAbsoluteTime time1,
const DtAbsoluteTime time2 
)

Initialize relative time to time2 - time1.

Member Function Documentation

long MAKLogger::DtRelativeTime::hourPart ( ) const

Get just the hours (0-...)

double MAKLogger::DtRelativeTime::hours ( ) const
long MAKLogger::DtRelativeTime::milisecondPart ( ) const

Get just the milisecond part (0 - 999)

long MAKLogger::DtRelativeTime::minutePart ( ) const

Get just the minutes (0-59)

double MAKLogger::DtRelativeTime::minutes ( ) const
bool MAKLogger::DtRelativeTime::operator!= ( const DtRelativeTime ) const
DtRelativeTime MAKLogger::DtRelativeTime::operator+ ( const DtRelativeTime relTime) const

Calculate the sum of the relative times.

DtRelativeTime MAKLogger::DtRelativeTime::operator- ( const DtRelativeTime relTime) const

Calculate the difference of the relative times.

bool MAKLogger::DtRelativeTime::operator< ( const DtRelativeTime ) const
bool MAKLogger::DtRelativeTime::operator<= ( const DtRelativeTime ) const
bool MAKLogger::DtRelativeTime::operator== ( const DtRelativeTime ) const

Check if time are the same.

bool MAKLogger::DtRelativeTime::operator> ( const DtRelativeTime ) const
bool MAKLogger::DtRelativeTime::operator>= ( const DtRelativeTime ) const
static double MAKLogger::DtRelativeTime::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.
long MAKLogger::DtRelativeTime::secondPart ( ) const

Get just the second part (0-59)

double MAKLogger::DtRelativeTime::seconds ( ) const
DtString MAKLogger::DtRelativeTime::toString ( int  percision = 0) const

Creates.

Member Data Documentation

double MAKLogger::DtRelativeTime::myTime
protected

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

Document ID: Generated on Thu Apr 11 12:13:00 EDT 2013 from SVN revision 126011
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)