//Function:XSleep()//Purpose:Tomaketheapplicationsleepforthespecifiedtime//duration.//DurationtheentiretimedurationXSleepsleeps,it//keepsprocessingthemessagepump,toensurethatall//messagesarepostedandthatthecallingthreaddoes//notappeartoblockallthreads!