Topic Path: Symbol Reference > Functions > Sleep Function
ContentsIndexHome
PreviousUpNext
Sleep Function

Suspends the current thread for the specified number of milliseconds.

File
procedure Sleep(
    ATime: cardinal
);
Parameters 
Description 
ATime 
The number of milliseconds to sleep. 

Sleep is a procedure used to suspend the current thread of execution for the number of milliseconds specified in ATime. While the current thread is suspended, control passes to other processes with an equal or higher priority. 

Sleep encapsulates the platform-specific procedures or functions used to suspend the current thread of execution. 

 

For the Windows platform, the procedure used is Windows.Sleep. 

 

For the .Net platform, the procedure used is the Sleep framework method. 

 

On the Linux platform, Sleep calls the Select function in Libc to delay for the specified number of milliseconds.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.