文件名称:Delphi的延时函数代替sleep
文件大小:1KB
文件格式:PAS
更新时间:2024-02-04 15:11:32
延时
procedure delay(msecs:integer); var Tick: DWord; Event: THandle; begin Event := CreateEvent(nil, False, False, nil); try Tick := GetTickCount + DWord(msecs); while (msecs > 0) and (MsgWaitForMultipleObjects(1, Event, False, msecs, QS_ALLINPUT) <> WAIT_TIMEOUT) do begin Appl