Skip to content

Commit

Permalink
Reduce chance of needlessly rescheduled Delayed calls
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh authored and cone56 committed Jan 6, 2020
1 parent e47eb41 commit 1e8b6e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class Delayed {
}
onTimeout(self) {
self.id = 0
if (self.time < +new Date) {
if (self.time <= +new Date) {
self.f()
} else {
setTimeout(self.handler, self.time - +new Date)
Expand Down

0 comments on commit 1e8b6e3

Please sign in to comment.