TimerSleep uses the HRT timer, which is not synchronized to any events. This function must be called from a time-critical thread. See DosSetPriority in the Control Program Programming Guide and Reference for information on changing a thread's priority.