1
0
mirror of https://github.com/psychopy/psychojs.git synced 2025-05-12 16:48:10 +00:00

util/Scheduler: clean up rAF last timestamp assignment

This commit is contained in:
Sotiri Bakagiannis 2021-02-15 18:36:18 +00:00
parent 0d56e598d3
commit c679174923

View File

@ -157,7 +157,7 @@ export class Scheduler
} }
// store frame delta for `Window.getActualFrameRate()` // store frame delta for `Window.getActualFrameRate()`
const lastTimestamp = self._lastTimestamp || timestamp; const lastTimestamp = self._lastTimestamp === undefined ? timestamp : self._lastTimestamp;
self._lastDelta = timestamp - lastTimestamp; self._lastDelta = timestamp - lastTimestamp;
self._lastTimestamp = timestamp; self._lastTimestamp = timestamp;