#include <rtsystem.h>
Public Methods | |
| Time () | |
| Creates a Time object set to 1/1/1970, 00:00:00. | |
| Time (int sec, int msec) | |
| Creates a Time object set to a custom time duration. | |
| Time (const String &) | |
| Creates a Time object by converting from the given String, which must be in the standard Unix format (as returned by toString()). More... | |
| Time | operator- (const Time &t) |
| Subtracts another time from this one and returns the difference. More... | |
| int | toInt () |
| Gets the time as milliseconds. More... | |
| String | toString () |
| Converts this time (milliseconds are ignored) to the standard Unix time string. More... | |
Static Public Methods | |
| Time | getCurrentTime () |
| Get the current time. | |
Public Attributes | |
| int | sec |
| Seconds since 1/1/1970, 00:00:00. | |
| int | msec |
| Milliseconds in the current second. | |
The values should be interpreted towards the "Unix birthday" 1/1/1970 00:00:00, if they are absolute (e.g. the result of a getCurrentTime() operation), but they may also be time differences (e.g. the result of a - operation).
|
|
Creates a Time object by converting from the given String, which must be in the standard Unix format (as returned by toString()).
If the string was not in correct format, the values of |
|
|
Subtracts another time from this one and returns the difference. If this time is earlier than the given one, the difference will be negative. |
|
|
Gets the time as milliseconds. If the time value is too large, the result is undefined. (This will always happen if this Time is an absolute time value.) |
|
|
Converts this time (milliseconds are ignored) to the standard Unix time string.
The result looks like |