OS/2 Date and Time API Differences
The following describes the implementation differences between the OS2Linux
library and the real OS/2 date time APIs.
These APIs are included in your application by including the following
definition in your application source file.
#define INCL_DOSDATETIME
DosGetDateTime
APIRET APIENTRY DosGetDateTime(PDATETIME pdt);
- The timezone is always returned as unknown.
DosSetDateTime
APIRET APIENTRY DosSetDateTime(PDATETIME pdt);
- This function is not supported by user mode Linux and always
returns ERROR_ACCESS_DENIED if the process is not owned by the
superuser (root).
- The input time is normalized in case any of the values are out of range.
This behavior is different than the original OS/2 API behavior which returned
the error ERROR_TS_DATETIME when values are out of range.
DosAsyncTimer
APIRET APIENTRY DosAsyncTimer(ULONG msec, HSEM hsem, PHTIMER phtimer);
- It is not necessary to call DosStopTimer for this kind of timer.
- A total of ten timers are available by default for the DosAsyncTimer
and DosStartTimer APIs. See the os2linux.h header file for more
information.
DosStartTimer
APIRET APIENTRY DosStartTimer(ULONG msec, HSEM hsem, PHTIMER phtimer);
- A total of ten timers are available by default for the DosAsyncTimer
and DosStartTimer APIs. See the os2linux.h header file for more
information.
DosStopTimer
APIRET APIENTRY DosStopTimer(HTIMER htimer);