lovr.timer.getDelta

Edit

Returns the time between the last two frames. This is the same value as the dt argument provided to lovr.update when VR is disabled. When VR is enabled, the dt will instead be lovr.headset.getDeltaTime.

dt = lovr.timer.getDelta()

Arguments

None

Returns

NameTypeDescription
dtnumber The delta time, in seconds.

Notes

The return value of this function will remain the same until lovr.timer.step is called. This function should not be used to measure times for game behavior or benchmarking, use lovr.timer.getTime for that.

See also