1. 首页
  2. 编程语言
  3. Delphi
  4. Delphi的延时函数代替sleep

Delphi的延时函数代替sleep

上传者: 2021-01-15 22:41:33上传 PAS文件 1KB 热度 23次
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
用户评论