start-sleep
does nothing for a given amount of time. -s
, -seconds
) or with specifying -milliSecond
(as a double). start-sleep -s 1 start-sleep -seconds 2 start-sleep -milliSecond 432.1
start-sleep n
can be interrupted, while sleeping, with ctrl-c. If the sleep should be uninterrauptable, the method Sleep()
of the .NET class System.Threading.Thread
class can be used: PS C:> [System.Threading.Thread]::Sleep(10 * 1000) # Sleep 10 seconds