Class Documentation
Time |
1.0 |
ID_TIME |
Stable |
System |
misc/time.h |
February 2003 |
Rocklyte Systems |
Rocklyte Systems, 1996-2003. All rights reserved. |
Description
The Time class is available for programs that require time and date
recording. In future, support will also be provided for the addition and
subtraction of date values.
Please note that the Time class uses strict metric interpretations of
"millisecond" and "microsecond" terminology. That is, a millisecond is
1/1000th (one thousandth) of a second, a microsecond is 1/1000000th (one
millionth) of a second.
To get the current system time, use the Query action.
Actions
The Time class supports the following actions:
Query | Updates the values in a time object with the current system date and time. |
Methods
The Time class implements the following methods:
SetTime | Sets the time of a time object to that of the system clock. |
Structure
The Time object consists of the following public fields:
Day | Day (1 - 31) |
DayOfWeek | Day of week (0 - 6) starting from Sunday. |
Hour | Hour (0 - 23) |
MicroSecond | Microsecond (0 - 999999) |
MilliSecond | Millisecond (0 - 999) |
Minute | Minute (0 - 59) |
Month | Month (1 - 12) |
Second | Second (0 - 59) |
TimeStamp | Read this field to get representation of the time as a single integer. |
Year | Year (-ve for BC, +ve for AD). |
Field: | Day |
Short: | Day (1 - 31) |
Type: | LONG |
Status: | Read/Write |
This field specifies the day of the month that is being represented. The
limit of the range is dependant on the month and year (eg February usually
has a limit 28 days except on leap year).
|
|
Field: | DayOfWeek |
Short: | Day of week (0 - 6) starting from Sunday. |
Type: | LONG |
Status: | Read |
This field tells you the day of the week for the date in the time object.
The value starts from zero, which represents Sunday.
|
|
Field: | Hour |
Short: | Hour (0 - 23) |
Type: | LONG |
Status: | Read/Write |
This field specifies the hour of the day.
|
|
Field: | MicroSecond |
Short: | Microsecond (0 - 999999) |
Type: | LONG |
Status: | Read/Write |
This field represents the micro-seconds of the time object. Microseconds
are measured as one millionth of a second.
|
|
Field: | MilliSecond |
Short: | Millisecond (0 - 999) |
Type: | LONG |
Status: | Read/Write |
This field represents the milli-seconds of the time object. Milliseconds
are measured as one thousandth of a second.
|
|
Field: | Minute |
Short: | Minute (0 - 59) |
Type: | LONG |
Status: | Read/Write |
This field specifies the minutes of the hour.
|
|
Field: | Month |
Short: | Month (1 - 12) |
Type: | LONG |
Status: | Read/Write |
This field specifies the month of the year.
|
|
Field: | Second |
Short: | Second (0 - 59) |
Type: | LONG |
Status: | Read/Write |
This field specifies the seconds in your time object.
|
|
Field: | TimeStamp |
Short: | Read this field to get representation of the time as a single integer. |
Type: | LARGE |
Status: | Get |
The TimeStamp field is a 64-bit integer that represents the time object
as an approximation of the number of milliseconds represented in the time object
(approximately the total amount of time passed since Zero-AD). This is
convenient for summarising a time value for comparison with other time stamps,
or for storing time in a 64-bit space.
|
|
Field: | Year |
Short: | Year (-ve for BC, +ve for AD). |
Type: | LONG |
Status: | Read/Write |
This field specifies the year. Negative values indicate BC and positive
values indicate AD.
|
|