DosTmrQueryFreq: Difference between revisions
Appearance
m Martini moved page OS2 API:CPI:DosTmrQueryFreq to DosTmrQueryFreq |
mNo edit summary |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
Provides the frequency of the IRQ0 high resolution timer (Intel 8254) / Queries the performance timer for its frequency. | |||
Provides the frequency of the IRQ0 high resolution timer (Intel 8254). | |||
==Syntax== | ==Syntax== | ||
DosTmrQueryFreq (pulTmrFreq) | |||
==Parameters== | ==Parameters== | ||
; | ;pulTmrFreq (PULONG) - output : Timer Frequency. | ||
Provides the frequency of the IRQ0 high resolution timer in hertz (timer units/sec). | :Provides the frequency of the IRQ0 high resolution timer in hertz (timer units/sec). | ||
==Return Code== | ==Return Code== | ||
;rc (APIRET) - returns:DosTmrQueryFrequency returns the following values: | |||
* 0 NO_ERROR | |||
* 87 ERROR_INVALID_PARAMETER | |||
DosTmrQueryFrequency returns the following values: | * 535 ERROR_TMR_NO_DEVICE | ||
* 99 ERROR_DEVICE_IN_USE | |||
* 0 | |||
* 87 | |||
* 535 | |||
* 99 | |||
==Remarks== | ==Remarks== | ||
Currently, the timer frequency = 1.19318 Mhz, for a timer resolution of about .838 microseconds. (See also [[DosTmrQueryTime]].) | |||
==Example Code== | ==Example Code== | ||
<PRE> | <PRE> | ||
#define INCL_DOSPROFILE | |||
#include <os2.h> | |||
PULONG pulTmrFreq; /* Timer Frequency. */ | |||
APIRET rc; /* Return Code. */ | |||
rc = DosTmrQueryFreq(pulTmrFreq); | |||
</PRE> | </PRE> | ||
==Related Functions== | ==Related Functions== | ||
* [[ | * [[DosDevConfig]] | ||
* [[ | * [[DosDevIOCtl]] | ||
* [[ | * [[DosPhysicalDisk]] | ||
[[Category: | [[Category:Dos]] |
Latest revision as of 22:46, 7 January 2024
Provides the frequency of the IRQ0 high resolution timer (Intel 8254) / Queries the performance timer for its frequency.
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);