Pause in Delphi

I can ot remember how to pause a procedure for a certain amount of seconds, say 3 secounds and then I want it to keep running.
jdtommyAsked:
Who is Participating?
 
simonetConnect With a Mentor Commented:
Here's a function that will do it:

procedure Sleep(Secs : cardinal);
var
  i : longint;
begin
  i := GetTickCount;
  while ((GetTickCount - i) / 1000) <= Secs do
      application.processmessages;
end;


To use the procedure above in your program, just do this:

Sleep(3);

Yours,

Alex
0
 
jdtommyAuthor Commented:
thanks I can't believe I forgot that
0
All Courses

From novice to tech pro — start learning today.