PyGaze - documentation - libtime
The time library contains a few functions to keep track of time, or pause the experiment.
contents
expstartget_time
pause
expend
Initializes the underlying libraries; time is set to 0 when calling this, setting the global variable
expbegintime. NOTE: PyGaze calls this function upon being imported, so you do not have to explicitly call it. You can pretty much ignore it, actually.
| arguments | |
|---|---|
| None | |
| keyword arguments | |
| None | |
| returns | |
| None | sets global variable expbegintime |
Returns current (as measured from expbegintime) time in milliseconds
| arguments | |
|---|---|
| None | |
| keyword arguments | |
| None | |
| returns | |
| time | float value of the current time in milliseconds |
Pauses the experiment for given number of milliseconds
| arguments | |
|---|---|
| None | |
| keyword arguments | |
| pausetime | time to pause in milliseconds |
| returns | |
| realpause | actual time the system paused (in milliseconds), which might be slightly different from pausetime |
Completely ends the experiment (only call this at the end!)
| arguments | |
|---|---|
| None | |
| keyword arguments | |
| None | |
| returns | |
| endtime | ending time of the experiment (in milliseconds, as measured from expbegintime) |
full source
You can find the full source code for libtime.py on GitHub.