How do I make my Delphi programs go to sleep?

Note:
Since the following was written, Delphi 2.0 has added a Sleep command. The following code can be used in Delphi 2.0
(though you'd have to rename it), but it's necessary only in Delphi 1.0.

One thing Delphi does not have is a sleep function, which causes
a program to wait a number of seconds before proceeding to its next
task. In the meantime, it will allow Windows background operations to process.

The Turbo Pascal equivalent to this is delay, but unfortunately
I haven't been able to find any documentation on it, so I don't know if
it is still available. It should be, but to be safe, I came up with a new
function called Sleep.

The procedure makes use of the Windows API function GetTickCount,
which returns the number of milliseconds that have elapsed since Windows
has started. The WinAPI documentation states that after 49 days of continuous
use, the tick count recycles back to zero, so if your machine runs on a
continuous basis with Windows, you may consider this.