Delphi 在减少占用资源的情况下,等待MSecs毫秒


本文整理自网络,侵删。

 
//在减少占用资源的情况下,等待MSecs毫秒
procedure WaitSomeTime(MSecs:LongInt);
var FirstTickCount,Now:LongInt;
begin
  FirstTickCount := GetTickCount();
  repeat
  Application.ProcessMessages;
  Now := GetTickCount();
  until (Now - FirstTickCount >= MSecs) or (Now < FirstTickCount);
end;

相关阅读 >>

Delphi安卓创建pdf文件并打开

Delphi判断按下的是回车键?

Delphi injectmemexe

Delphi Delphi tparallel cleanup needed用法

Delphi(更改图标)

Delphi 7 中的随机函数

Delphi monthcalendar1 获取选中日期

Delphi 设置系统默认打印机

Delphi xe2-firemonkey 新功能

Delphi 将鼠标锁定在一定范围

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...