[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Classes' (#rtl)

# TThread.Sleep

Prevent thread execution

## Declaration

Source position: classesh.inc line 1807

`public class procedure TThread.Sleep(`
`aMilliseconds: Cardinal`
`);`

## Description

Sleep blocks the execution of the thread for aMilliseconds. This function simply calls sysutils.sleep

In difference with TThread.SpinWait, a thread switch may occur during the sleep.

## See also

SysUtils.Sleep |  | Suspend execution of a program for a certain time.
TThread.SpinWait |  | Prevent thread execution in a spin-wait loop

Documentation generated on: May 14 2021