lovr.headset.getTime

Edit

Returns the estimated time in the future at which the light from the pixels of the current frame will hit the eyes of the user.

This can be used as a replacement for lovr.timer.getTime for timestamps that are used for rendering to get a smoother result that is synchronized with the display of the headset.

time = lovr.headset.getTime()

Arguments

None

Returns

NameTypeDescription
timenumber The predicted display time, in seconds.

Notes

This has a different epoch than lovr.timer.getTime, so it is not guaranteed to be close to that value.

See also