Compartilhar via


Controlling Timing with the Sleep Timer

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

Windows Mobile uses the Sleep function and the WaitXXX functions to control timing and synchronization. For more information about WaitXXX functions, see Wait Functions.

The timer is always set to 1 millisecond under default working conditions when there are threads to schedule. Therefore, you can call Sleep(1) and expect to receive approximately between 1- and 2-millisecond (ms) accuracy if the thread is the highest priority thread running on the system.

However, the accuracy depends on the priority of your thread, the priority of other threads, and whether interrupt service routines (ISRs) are running.

See Also

Concepts

Processes and Threads