Psychtoolbox
Timing
It is necessary to log onset timing of stimuli for first level analysis, and important to be aware of how time is recorded.
Docs
- http://psychtoolbox.org/docs/Screen-Flip
Flip (optionally) returns a high-precision estimate of the system time (in seconds) when the actual flip has happened in the return argument ‘VBLTimestamp’. .... ‘FlipTimestamp’ is a timestamp taken at the end of Flip’s execution. Use the difference between FlipTimestamp and VBLTimestamp to get an estimate of how long Flips execution takes. [in what units!?]
- PTBs Timestamp FAQ
FlipTimestamp, which is not much more than a GetSecs taken at end of Flip, can and often will be earlier than StimulusOnsetTimestamp, as flip processing usually already completes while the display is still in VBLANK, preparing for display of the new stimulus frame, that's why StimulusOnsetTimestamp == VBLTimestamp > FlipTimestamp.
Examples
w = Screen('OpenWindow', 0, [0 0 0], [0 0 800 600]); for i=1:3; [vts(i,1), vts(i,2)] = Screen('Flip',w); vts(i,3) = GetSecs(); end; sca format longG vts,
On linux (+ octave), GetSecs() as well as Flip's VBLTimestamp and StimulusOnsetTime
are in epoch seconds.
vts =
1738935521.40479 1738935521.40479 1738935521.405101
1738935521.421465 1738935521.421465 1738935521.421387
1738935521.438137 1738935521.438137 1738935521.438507
On windows, these numbers or clock ticks since start up. Similar to EPrime Task Presentation Software.
[foran] windows output