Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Library: Object-Pascal / Delphi-Language (https://www.delphipraxis.net/35-library-object-pascal-delphi-language/)
-   -   Delphi Delay in Delphi (https://www.delphipraxis.net/96-delay-delphi.html)

Luckie 11. Jun 2002 14:47


Delay in Delphi
 
Delphi-Quellcode:
procedure Delay(msec: Longint);
var
  start, stop: Longint;
begin
  start := GetTickCount;
  repeat
    stop := GetTickCount;
    Application.ProcessMessages;
  until (stop - start) >= msec;
end;
[edit=toms]Code formatiert. Mfg, toms[/edit]

CalganX 12. Mai 2004 16:30

Re: Delay in Delphi
 
Eine Resssourcenschonendere Variante von negaH: http://www.delphipraxis.net/internal...ect.php?t=7355


Alle Zeitangaben in WEZ +1. Es ist jetzt 23:15 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz