Skip to content

Commit

Permalink
Fix loopingTimer
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Hotze <[email protected]>
  • Loading branch information
florian-h05 committed Oct 4, 2022
1 parent 6174393 commit 32d4d88
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions loopingTimer.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ class LoopingTimer {
loop(func, when, name) {

this.func = func;
this.name = name;
if (!when) this.expired();
else {
this.timer = helpers.createTimer(when, () => this.expired(), null, name);
this.timer = helpers.createTimer(when, () => this.expired(), null, name, 'loopingTimer');
}
}

Expand All @@ -37,9 +38,9 @@ class LoopingTimer {
expired() {
var when = this.func();
if (when) {
this.timer = actions.ScriptExecution.createTimer(
this.timer = helpers.createTimer(
time.toZDT(when),
() => this.expired(), null, null, 'loopingTimer');
() => this.expired(), null, this.name, 'loopingTimer');
}
}

Expand Down

0 comments on commit 32d4d88

Please sign in to comment.