FIX: We shouldn't memoize the last time something is read

This commit is contained in:
Robin Ward 2019-05-28 10:50:59 -04:00
parent bed3560d61
commit 9bdfaa195e
1 changed files with 2 additions and 6 deletions

View File

@ -60,7 +60,7 @@ export default class {
// Reset our timers
reset() {
const now = this._getTime();
const now = new Date().getTime();
this._lastTick = now;
this._lastScrolled = now;
this._lastFlush = 0;
@ -74,7 +74,7 @@ export default class {
}
scrolled() {
this._lastScrolled = this._getTime();
this._lastScrolled = new Date().getTime();
}
registerAnonCallback(cb) {
@ -224,8 +224,4 @@ export default class {
});
}
}
_getTime() {
return (this._time = this._time || new Date().getTime());
}
}