stimuli.time.sleep🔗
- stimuli.time.sleep(duration, *, clock=<class 'stimuli.time._clock.Clock'>)[source]🔗
High precision sleep function.
- Parameters:
- duration
float
Duration to sleep in seconds. If the value is less than or equal to 0, the function returns immediately.
- clock
stimuli.time.BaseClock
Clock object to use for time measurement. By default, the
stimuli.time.Clock
class is used.
- duration
Notes
On Windows, only python version 3.11 and above have good accuracy when sleeping. This accuracy limitation dictates the minimum version of
stimuli
.
Examples using stimuli.time.sleep
🔗
Synchronize sound and trigger