DosTmrQueryFreq: Difference between revisions
Appearance
mNo edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
==Syntax== | ==Syntax== | ||
DosTmrQueryFreq (pulTmrFreq) | |||
==Parameters== | ==Parameters== | ||
Line 17: | Line 9: | ||
==Return Code== | ==Return Code== | ||
rc (APIRET) - returns | |||
DosTmrQueryFrequency returns the following values: | DosTmrQueryFrequency returns the following values: | ||
* 0 NO_ERROR | * 0 NO_ERROR | ||
Line 23: | Line 16: | ||
* 535 ERROR_TMR_NO_DEVICE | * 535 ERROR_TMR_NO_DEVICE | ||
* 99 ERROR_DEVICE_IN_USE | * 99 ERROR_DEVICE_IN_USE | ||
==Remarks== | |||
Currently, the timer frequency = 1.19318 Mhz, for a timer resolution of about .838 microseconds. (See also DosTmrQueryTime.) | |||
==Example Code== | |||
<PRE> | |||
#define INCL_DOSPROFILE | |||
#include <os2.h> | |||
PULONG pulTmrFreq; /* Timer Frequency. */ | |||
APIRET rc; /* Return Code. */ | |||
rc = DosTmrQueryFreq(pulTmrFreq); | |||
</PRE> | |||
==Related Functions== | ==Related Functions== |
Revision as of 17:58, 24 August 2017
Provides the frequency of the IRQ0 high resolution timer (Intel 8254).
Syntax
DosTmrQueryFreq (pulTmrFreq)
Parameters
- pulTmrFreq (PULONG) - output
- Timer Frequency.
- Provides the frequency of the IRQ0 high resolution timer in hertz (timer units/sec).
Return Code
rc (APIRET) - returns
DosTmrQueryFrequency returns the following values:
- 0 NO_ERROR
- 87 ERROR_INVALID_PARAMETER
- 535 ERROR_TMR_NO_DEVICE
- 99 ERROR_DEVICE_IN_USE
Remarks
Currently, the timer frequency = 1.19318 Mhz, for a timer resolution of about .838 microseconds. (See also DosTmrQueryTime.)
Example Code
#define INCL_DOSPROFILE #include <os2.h> PULONG pulTmrFreq; /* Timer Frequency. */ APIRET rc; /* Return Code. */ rc = DosTmrQueryFreq(pulTmrFreq);