Understanding display update time stamps

Whenever the stimulus displayed is updated, MWorks generates a #stimDisplayUpdate event. Like all MWorks events, display update announcements include an event time (indicating microseconds elapsed since the server started). The relationship between the event time and the actual update of the display hardware depends on what version of MWorks you're using.

0.5 and later

In MWorks 0.5, the time stamp on a display update announcement is a prediction (provided by the operating system) of when the rendered frame will appear on screen. More precisely, it is an estimate (based on past data) of when the next vertical blank interrupt (VBI) will occur. The VBI marks the beginning of the display's vertical blanking interval, which immediately precedes the start of the physical display refresh.

In the case that, due to software delays, rendering of the current frame fails to complete before the next VBI occurs, the physical display update will lag the announced time by one (or more) refresh periods. However, such a lag should be accompanied by a warning message indicating skipped display refresh cycles (as long as #warnOnSkippedRefresh is set to 1).

0.4.5

In MWorks 0.4.5, display updates are announced after the graphics buffer swap completes. The buffer swap occurs during the display's vertical blanking interval, which immediately precedes the beginning of the physical display update.

Due to software limitations, MWorks' confirmation of buffer swap completion can sometimes be delayed, resulting in a reported display update time that is later than the physical update time. In practice, such delays are relatively rare. When they do occur, the delay duration is almost always less than a display refresh period.

0.4.4 and earlier

In MWorks 0.4.4, display updates are announced when the update is completely rendered on the graphics hardware back buffer. The interval between completion of rendering and when the rendered scene appears on screen varies, depending on when the display update was initiated and how many rendered buffers the graphics hardware can store simultaneously. In general, a display update announcement may precede the physical display update by as much as one or two display refresh periods (e.g. approximately 17-33ms for a display running at 60Hz).

Recent Discussions

14 Dec, 2018 04:14 PM
10 Dec, 2018 02:40 PM
17 Nov, 2018 12:53 AM
16 Nov, 2018 05:01 PM
14 Nov, 2018 09:17 PM