|
MoSync 3.2.1
|
Class for representing a time span. Span can be positive as well as negative. More...
#include <MAP/TimeSpan.h>
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) |
Class for representing a time span. Span can be positive as well as negative.
| MAPUtil::TimeSpan::TimeSpan | ( | int | ticks | ) |
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.
| static TimeSpan MAPUtil::TimeSpan::maxValue | ( | ) | [static] |
Returns the largest value that can be represented by a TimeSpan.
| static TimeSpan MAPUtil::TimeSpan::minValue | ( | ) | [static] |
Returns the smallest value that can be represented by a TimeSpan.
| static TimeSpan MAPUtil::TimeSpan::zero | ( | ) | [static] |
Returns zero as a TimeSpan.
| time_t MAPUtil::TimeSpan::getTicks | ( | ) | const |
Returns number of ticks in time span.
Referenced by MAPUtil::operator!=(), MAPUtil::operator+(), MAPUtil::operator-(), MAPUtil::operator<(), MAPUtil::operator<=(), MAPUtil::operator==(), MAPUtil::operator>(), and MAPUtil::operator>=().
| int MAPUtil::TimeSpan::getDays | ( | ) | const |
Returns days component.
| int MAPUtil::TimeSpan::getHours | ( | ) | const |
Returns hours component.
| int MAPUtil::TimeSpan::getMinutes | ( | ) | const |
Returns minutes component.
| int MAPUtil::TimeSpan::getSeconds | ( | ) | const |
Returns seconds component.
| double MAPUtil::TimeSpan::getTotalDays | ( | ) | const |
returns value in unit of days.
| double MAPUtil::TimeSpan::getTotalHours | ( | ) | const |
Returns value in a unit of hours.
| double MAPUtil::TimeSpan::getTotalMinutes | ( | ) | const |
Returns value in a unit of minutes.
| double MAPUtil::TimeSpan::getTotalSeconds | ( | ) | const |
Returns value in a unit of seconds.
| TimeSpan MAPUtil::TimeSpan::add | ( | TimeSpan | ts | ) | const |
Returns sum of two time spans, as a TimeSpan.
| TimeSpan MAPUtil::TimeSpan::duration | ( | ) | const |
| TimeSpan MAPUtil::TimeSpan::negate | ( | ) | const |
Returns negated value.
Referenced by MAPUtil::operator-().
| TimeSpan MAPUtil::TimeSpan::subtract | ( | TimeSpan | ts | ) | const |
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.