您的位置:首页 > 编程语言 > Delphi

delphi延时函数详细说明

2015-03-01 16:49 288 查看
procedure Delay(msec:integer);
//延时函数,msec 为毫秒(千分之1秒)
var
FirstTickCount : real;
begin
FirstTickCount := GetTickCount();
FirstTickCount := FirstTickCount + msec;

While FirstTickCount > GetTickCount() do
Application.HandleMessage; //关键在这里

end;

delay (5000); // 延时 5 秒

参见:http://blog.csdn.net/shao882

详见:100脚本网
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: