#timeout: number | NodeJS.Timeout
constructor (f: () => any, t: number) {
- this.#ticker = setInterval(() => { }, 1000)
+ this.#ticker = setInterval(Function.prototype, 1000)
this.#f = f
this.#start = performance.now()
this.#timeout = setTimeout(this.#f, t)
resume () {
if (this.#isPaused) {
- this.#ticker = setInterval(() => { }, 1000)
+ this.#ticker = setInterval(Function.prototype, 1000)
this.#start = performance.now()
this.#timeout = setTimeout(this.#f, this.#elapsed)
this.#isPaused = false