MoSync 3.3
MAPUtil::TimeSpan Class Reference

Class for representing a time span. Span can be positive as well as negative. More...

#include <MAP/TimeSpan.h>

List of all members.

Public Member Functions

 TimeSpan (int ticks)
 TimeSpan (int hours, int minutes, int seconds)
 TimeSpan (int days, int hours, int minutes, int seconds)
time_t getTicks () const
int getDays () const
int getHours () const
int getMinutes () const
int getSeconds () const
double getTotalDays () const
double getTotalHours () const
double getTotalMinutes () const
double getTotalSeconds () const
TimeSpan add (TimeSpan ts) const
TimeSpan duration () const
TimeSpan negate () const
TimeSpan subtract (TimeSpan ts) const

Static Public Member Functions

static TimeSpan maxValue ()
static TimeSpan minValue ()
static TimeSpan zero ()
static TimeSpan fromDays (double days)
static TimeSpan fromHours (double hours)
static TimeSpan fromMinutes (double minutes)
static TimeSpan fromSeconds (double seconds)

Detailed Description

Class for representing a time span. Span can be positive as well as negative.


Constructor & Destructor Documentation

Creates a timespan.

MAPUtil::TimeSpan::TimeSpan ( int  hours,
int  minutes,
int  seconds 
)

Returns a new TimeSpan from the specified hours, minutes, and seconds.

MAPUtil::TimeSpan::TimeSpan ( int  days,
int  hours,
int  minutes,
int  seconds 
)

Returns a new TimeSpan from the specified days, hours, minutes, and seconds.


Member Function Documentation

Returns the largest value that can be represented by a TimeSpan.

Returns the smallest value that can be represented by a TimeSpan.

static TimeSpan MAPUtil::TimeSpan::zero ( ) [static]

Returns zero as a TimeSpan.

Returns days component.

Returns hours component.

Returns minutes component.

Returns seconds component.

returns value in unit of days.

Returns value in a unit of hours.

Returns value in a unit of minutes.

Returns value in a unit of seconds.

Returns sum of two time spans, as a TimeSpan.

Returns the absolute value of a TimeSpan, as a TimeSpan.

Returns negated value.

Referenced by MAPUtil::operator-().

Returns difference between two time spans, as a TimeSpan.

Referenced by MAPUtil::operator-().

static TimeSpan MAPUtil::TimeSpan::fromDays ( double  days) [static]

Returns a new TimeSpan from the specified days.

static TimeSpan MAPUtil::TimeSpan::fromHours ( double  hours) [static]

Returns a new TimeSpan from the specified hours.

static TimeSpan MAPUtil::TimeSpan::fromMinutes ( double  minutes) [static]

Returns a new TimeSpan from the specified minutes.

static TimeSpan MAPUtil::TimeSpan::fromSeconds ( double  seconds) [static]

Returns the specified seconds, as a TimeSpan.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines