From e9618dacb21560e53c8983236ec039bb59de8f8b Mon Sep 17 00:00:00 2001 From: Mathew Date: Fri, 17 Feb 2023 12:32:22 +1100 Subject: [PATCH] reduce timer allocations --- lib/TimerFunction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/TimerFunction.js b/lib/TimerFunction.js index 8d8323a..def6fc1 100644 --- a/lib/TimerFunction.js +++ b/lib/TimerFunction.js @@ -32,7 +32,7 @@ class TimerFunction { if(delay === undefined || delay === null) delay = this._defaultDelay - if(this._timer === timer) this._timer = setTimeout(this._boundWork, delay) + if(this._timer === timer) this._timer.refresh() } start(timeout = null){ if(this._timer) {