home *** CD-ROM | disk | FTP | other *** search
/ PC-X 1997 October / pcx14_9710.iso / swag / delphi.swg / 0008_Delay Procedure in Delphi.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1995-11-22  |  566 b   |  19 lines

  1. {This is an equivalent to the Delay procedure in Borland Pascal. You may
  2. find it of interest. It is not mine. It was given to me by someone else
  3. who did not cite the source. Hope it helps your important WWW page. Take
  4. care.
  5. }
  6.  
  7. procedure TForm1.Delay(msecs:integer);
  8. var
  9.    FirstTickCount:longint;
  10. begin
  11.      FirstTickCount:=GetTickCount;
  12.      repeat    
  13.            Application.ProcessMessages; {allowing access to other 
  14.                                          controls, etc.}
  15.      until ((GetTickCount-FirstTickCount) >= Longint(msecs));
  16. end;
  17.  
  18.  
  19.