Delay for X amount of seconds. (wait) pause


Delay for X amount of seconds.

It works by get the current time and looping until the time
equals the current time + X amount of seconds.


procedure Delay(seconds:word);
var
   later:TDateTime;
begin
   later:=now+(seconds/(24.0*60.0*60.0));
   while now < later do
     application.processmessages;
end;