时间延迟的问题,谁写一个时候延迟的方法吗?不要占用cup的使用率。
各为大虾,我是这样写的,但是占用cpu的使用率太高。
procedure WairForTime(const second: integer);
var
  starttime: TDateTime;
begin
  starttime := now;
  repeat
    application.processmessages;
  until now > starttime + second * (1 / 24 / 60 / 60);
end;请问各位大虾,有没有更好的办法呢。不要用sleep函数。急请各位多多帮忙。谢谢。