![]() To avoid unnecessarily increasing power consumption, the operating system runs the system clock at its maximum rate only when necessary to satisfy the timing requirements of high-resolution timers. However, if one or more high-resolution timers are set, the operating system might need to run the system clock at its maximum rate for at least a part of the time before these timers expire. If no high-resolution timers are set, the operating system typically runs the system clock at its default rate. For more information about the relationship between system clock resolution and timer accuracy, see Timer Accuracy. If a driver specifies a relative expiration time for a high-resolution timer, the timer can expire as late as about a millisecond after the specified expiration time but it never expires early. If a driver specifies a relative expiration time for a default-resolution timer, the timer can expire up to about 15 milliseconds earlier or later than the specified expiration time. Thus, the expiration time of a default-resolution timer (which ExAllocateTimer creates if the EX_TIMER_HIGH_RESOLUTION flag is not set) can be controlled only to within about 15 milliseconds, but the expiration time of a high-resolution timer can be controlled to within a millisecond. Controlling timer accuracyįor example, for Windows running on an x86 processor, the default interval between system clock ticks is typically about 15 milliseconds, and the minimum interval between system clock ticks is about 1 millisecond. ![]() This member is a part of the structure starting with Windows 8.1 and KMDF version 1.13. To create a high-resolution timer, the driver sets the UseHighResolutionTimer member of this structure to TRUE. In this call, the driver passes a pointer to a WDF_TIMER_CONFIG structure as a parameter. When the driver calls the ExSetTimer routine to set the high-resolution timer, the operating system increases the resolution of the system clock, as necessary, so that the times at which the timer expires more precisely correspond to the nominal expiration times specified in the DueTime and Period parameters.Ī Kernel-Mode Driver Framework (KMDF) driver can call the WdfTimerCreate method to create a high-resolution timer. To create a high-resolution timer, a WDM driver calls the ExAllocateTimer routine and sets the EX_TIMER_HIGH_RESOLUTION flag in the Attributes parameter. Thus, drivers should use high-resolution timers only when timer accuracy is essential, and use default-resolution timers in all other cases. ![]() However, high-resolution timers require system clock interrupts to-at least, temporarily-occur at a higher rate, which tends to increase power consumption. In contrast, timers that are limited to the default system clock resolution are significantly less accurate. The accuracy of a high-resolution timer is limited only by the maximum supported resolution of the system clock. Starting with Windows 8.1, drivers can use the Ex XxxTimer routines to manage high-resolution timers.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |