The Sleep function suspends the execution of the current thread for a specified interval. VOID Sleep( DWORD dwMilliseconds // sleep time in milliseconds ); The GetTickCount function retrieves the number of milliseconds that have elapsed since Windows was started. DWORD GetTickCount(VOID) ParametersThis function has no parameters.
);
The GetTickCount function retrieves the number of milliseconds that have elapsed since Windows was started. DWORD GetTickCount(VOID)
ParametersThis function has no parameters.
而使用sleep会先等,然后显示所有循环的结果,不知道为什么GetTickCount不知该如何应用?
begin
dt := now;
repeat
application.processmessage;
until (now - dt) * 86400 > N;
//N以秒为单位
end;