|
|
Psion time related utility class.
PsiTime provides easy access to the time format, used when communicating with a Psion. Internally, the time is always normalized to GMT. The time value can be set and retrieved in both Unix and Psion formats. This allows easy conversion between both formats. NOTE: For proper conversion, the current timezone of the Psion has to be set. For EPOC devices, the timezone can be evaluated using rpcs::getMachineInfo . For SIBO devices, unfortunately there is no known method of retrieving this information. Therefore, if the timezone is not set, a fallback using the environment variable PSI_TZ is provided. Users should set this variable to the offset of their time zone in seconds. If PSI_TZ is net set, a second fallback uses the local machine's setup, which assumes that both Psion and local machine have the same time zone and daylight settings.
| |
Contructs a new instance.
Parameters:
| _utv | A Unix time value for initialization. |
| _utz | A Unix timezone for initialization. |
| |
Contructs a new instance.
Parameters:
| time | A Unix time value for initialization. |
| |
Contructs a new instance.
Parameters:
| _ptv | A Psion time value for initialization. |
| _ptz | A Psion timezone for initialization. |
| |
Contructs a new instance.
Parameters:
| _ptvHi | The high 32 bits of a Psion time value for initialization. |
| _ptvLo | The low 32 bits of a Psion time value for initialization. |
| |
Constructs a new instance, initializing to now.
| |
A copy-constructor
| ~ |
Destroys the instance.
| void |
Modifies the value of this instance.
Parameters:
| _ptv | The new Psion time representation. |
| void |
Modifies the value of this instance.
Parameters:
| stime | The new SIBO time representation. |
| void |
Modifies the value of this instance.
Parameters:
| _ptvHi | The high 32 bits of a Psion time. |
| _ptvLo | The low 32 bits of a Psion time. |
| void |
Sets the Psion time zone of this instance.
Parameters:
| _ptz | The new Psion time zone. |
| void |
Sets the value of this instance.
Parameters:
| _utv | The new Unix time representation. |
| void |
Sets the value of this instance.
Parameters:
| _utv | The new Unix time representation. |
| void |
Sets the value of this instance to the current time of the Unix machine.
| time_t |
Retrieves the instance's current value in Unix time format.
Returns: The instance's current time as Unix time_t.
| u_int32_t |
Retrieves the instance's current value in SIBO time format.
Returns: The instance's current time as SIBO time.
| psi_timeval & |
Retrieves the instance's current value in Psion time format.
Returns: The instance's current time a Psion struct psi_timeval_t.
| const u_int32_t |
Retrieves the instance's current value in Psion time format, high 32 bits.
Returns: The instance's current time as lower 32 bits of a Psion struct psi_timeval_t.
| const u_int32_t |
Retrieves the instance's current value in Psion time format, low 32 bits.
Returns: The instance's current time as upper 32 bits of a Psion struct psi_timeval_t.
| friend ostream & |
Prints the instance's value in human readable format. This function uses the current locale setting for formatting the time.
Parameters:
| s | The stream to be written. |
| t | The instance whose value should be displayed. |
Returns: The stream.
| PsiTime & |
Assignment operator
| bool |
Comparison operators
| bool |
| bool |
| enum |