get timer on connect, patch play/pause functionality

This commit is contained in:
Alec
2021-11-30 19:24:08 -05:00
parent 5c869182a2
commit e21ad8493f
13 changed files with 230 additions and 78 deletions

View File

@@ -37,7 +37,9 @@ class ServerTimer {
}
runTimer () {
this.totalTime = convertFromHoursToMilliseconds(this.hours) + convertFromMinutesToMilliseconds(this.minutes);
let total = convertFromHoursToMilliseconds(this.hours) + convertFromMinutesToMilliseconds(this.minutes);
this.totalTime = total;
this.currentTimeInMillis = total;
this.logger.debug('STARTING TIMER FOR ' + this.totalTime + 'ms');
this.start = Date.now();
const expected = Date.now() + this.tickInterval;