fix: reset timers

reset timers as needed with roll mode
This commit is contained in:
cv
2021-10-31 11:16:32 +01:00
parent 3a85a483c1
commit 5a68d292e1
+6
View File
@@ -961,6 +961,7 @@ export class EventTimer extends Timer {
foundNow = true;
// set timers
this.secondaryTimer = null;
this._startedAt = e.timeStart;
this._finishAt = e.timeEnd;
this.duration = e.timeEnd - e.timeStart;
@@ -1000,8 +1001,13 @@ export class EventTimer extends Timer {
this._loadThisTitles(e, 'next');
if (foundNow == null) {
// only warn the first time
if (this.secondaryTimer == null)
console.log('Roll: waiting for event start');
// reset running timer
this.current = null;
// timer counts to nextStart
this.secondaryTimer = nextStart;
}