Windows's Snipping tool can capture the screen, but sometimes I want to capture the screen after five seconds, such as taking an image being displayed by the webcam. (Run the script and smile at the camera, for example.)
How do I sleep for 5 seconds in a batch file?
I'm very surprised no one has mentioned:
C:\> timeout 5
N.B. Please note however (thanks Dan!) that timeout 5
means:
Sleep anywhere between 4 and 5 seconds
This can be verified empirically by putting the following into a batch file, running it repeatedly and calculating the time differences between the first and second echo
s:
@echo off
echo %time%
timeout 5 > NUL
echo %time%