mirror of
https://github.com/psychopy/psychojs.git
synced 2025-05-12 08:38:10 +00:00
util/Scheduler: clean up rAF last timestamp assignment
This commit is contained in:
parent
0d56e598d3
commit
c679174923
@ -157,7 +157,7 @@ export class Scheduler
|
||||
}
|
||||
|
||||
// store frame delta for `Window.getActualFrameRate()`
|
||||
const lastTimestamp = self._lastTimestamp || timestamp;
|
||||
const lastTimestamp = self._lastTimestamp === undefined ? timestamp : self._lastTimestamp;
|
||||
|
||||
self._lastDelta = timestamp - lastTimestamp;
|
||||
self._lastTimestamp = timestamp;
|
||||
|
Loading…
Reference in New Issue
Block a user