Times used in Sleep() are in system time expressed as seconds since 00:00:00 1/1/70. See the description of the Time() function for useful information about system times.
This function returns control to Windows® so that it may continue to process other windows and applications. If you have experiments running in other windows, they continue to run normally.
A time delay for a known time interval can be implemented in three steps:
This can be done in one line. Suppose we want to delay for 15 seconds:
Sleep( 15 + Time() )
Time | INDEX | Sleep until this time (seconds since 1/1/70) | |
Result | INDEX | The number of seconds remaining when Sleep returned. Result is zero if Sleep() returned because Time was reached. If the user clicked the Skip button, Result is the number of seconds remaining until Time. |