Compartilhar via


CPUGetSysTimerCountMax Routine (Windows CE 5.0)

Send Feedback

OEMIdle calls CPUGetSysTimerCountMax to determine whether it can program the timer interrupt service routine (ISR) for the full interval until the next thread-scheduling event.

If the requested delay, indicated by dwIdleMSecRequested, is longer than the underlying hardware can support, CPUGetSysTimerCountMax returns the maximum delay possible.

This routine is prototyped as shown in the following code example.

DWORD CPUGetSysTimerCountMax(DWORD dwIdleMSecRequested);

The following code example requires that you define IDLE_MAX_MS with the maximum millisecond delay that the hardware supports.

DWORD CPUGetSysTimerCountMax(DWORD dwIdleMSecRequested);
{
  if (dwIdleMSecRequested > IDLE_MAX_MS) {
  // Our timer cannot idle more than IDLE_MAX_MS milliseconds. 
  // The sleep time needs to be broken into reasonable chunks.
  return IDLE_MAX_MS;
  }
  return dwIdleMSecRequested;
}

See Also

Boilerplate Interface Routines

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.