#include <datetime.h>
|
| | Time () |
| |
| | Time (uint hour, uint minute, uint second, uint precision=0, uint fraction=0) |
| |
| | Time (uint hmsf, uint precision=0) |
| |
| | Time (const String &str, const String &format) |
| |
| void | set (uint hour, uint minute, uint second, uint precision=0, uint fraction=0) |
| |
| void | setHMSF (uint hmsf, uint precision=0) |
| |
| uint | getHour () const |
| |
| uint | getMinute () const |
| |
| uint | getSecond () const |
| |
| uint | getPrecision () const |
| |
| uint | getFraction () const |
| |
| uint | getMillisecond () const |
| |
| uint | getHMSF (uint precision=0) const |
| |
| uint | toUint (uint precision=0) const |
| |
| void | toString (String16 *buf, uint precision=~0, bool sep=false, bool dec=false) const |
| |
| String | toString (const String &format) const |
| |
| Time & | operator+= (int delta) |
| | increment/decrement the time More...
|
| |
Definition at line 110 of file datetime.h.
- Parameters
-
| hour | the hour [0..23] |
| minute | the minute [0..59] |
| second | the second [0..60] |
| precision | 0 = seconds, 1 = tenths, 2 = hundredths, 3 = milliseconds |
| fraction | number of tenths, hundredths, milliseconds |
| Xpace::Time::Time |
( |
uint |
hmsf, |
|
|
uint |
precision = 0 |
|
) |
| |
- Parameters
-
| the | time in hhmmssfff format |
| precision | 0 = seconds, 1 = tenths, 2 = hundredths, 3 = milliseconds |
| Xpace::Time::Time |
( |
const String & |
str, |
|
|
const String & |
format |
|
) |
| |
- Parameters
-
| the | time in string form |
| format | the format of the time e.g. "hh:mm:ss" |
| void Xpace::Time::set |
( |
uint |
hour, |
|
|
uint |
minute, |
|
|
uint |
second, |
|
|
uint |
precision = 0, |
|
|
uint |
fraction = 0 |
|
) |
| |
- Parameters
-
| hour | the hour (0..23) |
| minute | the minute (0..59) |
| second | the second (0..60) |
| precision | 0 = seconds, 1 = tenths, 2 = hundredths, 3 = milliseconds |
| fraction | number of tenths, hundredths, millisecondseconds |
| void Xpace::Time::setHMSF |
( |
uint |
hmsf, |
|
|
uint |
precision = 0 |
|
) |
| |
| uint Xpace::Time::getHour |
( |
| ) |
const |
| uint Xpace::Time::getMinute |
( |
| ) |
const |
| uint Xpace::Time::getSecond |
( |
| ) |
const |
| uint Xpace::Time::getPrecision |
( |
| ) |
const |
| uint Xpace::Time::getFraction |
( |
| ) |
const |
| uint Xpace::Time::getMillisecond |
( |
| ) |
const |
| uint Xpace::Time::getHMSF |
( |
uint |
precision = 0 | ) |
const |
- Parameters
-
| precision | force this precision |
- Returns
- time in hhmmssfff format
| uint Xpace::Time::toUint |
( |
uint |
precision = 0 | ) |
const |
- Parameters
-
- Returns
- seconds * 10^precision + fraction
| static Time Xpace::Time::fromUint |
( |
uint |
val, |
|
|
uint |
precision = 0 |
|
) |
| |
|
static |
- Parameters
-
| val | seconds + 10^precision + fraction |
| precision | force this precision |
| void Xpace::Time::toString |
( |
String16 * |
buf, |
|
|
uint |
precision = ~0, |
|
|
bool |
sep = false, |
|
|
bool |
dec = false |
|
) |
| const |
- Parameters
-
| precision | force this precision; if ~0, use internal precision |
- Return values
-
| buf | the buffer into which to store the time (and its length) |
- Parameters
-
| format | the format of the time e.g. "hh:mm:ss" |
| Time& Xpace::Time::operator+= |
( |
int |
delta | ) |
|
increment/decrement the time
- Parameters
-
| increment | the time by this many units if precision == 0, unit = second; if precision = 1, unit = tenths; etc. wrap on under/overflow |
The documentation for this class was generated from the following file: