Skip to content

Commit

Permalink
perf(DefaultScheduler): remove setting of timer property
Browse files Browse the repository at this point in the history
setTimeout() reference was being saved for no reason
  • Loading branch information
tusharmath committed Feb 13, 2017
1 parent 833215e commit 4fa762d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lib/DefaultScheduler.ts
Expand Up @@ -35,10 +35,9 @@ class Periodic implements Subscription {
}
class Delay implements Subscription {
closed = false
private timer: number

constructor (private task: ITask, private timeout: number) {
this.timer = setTimeout(this.onEvent.bind(this), this.timeout) as any as number
setTimeout(this.onEvent.bind(this), this.timeout)
}

private onEvent () {
Expand Down

0 comments on commit 4fa762d

Please sign in to comment.