MCPcopy Create free account
hub / github.com/AlecM33/Werewolf / resumeTimer

Method resumeTimer

server/modules/ServerTimer.js:74–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72 }
73
74 resumeTimer () {
75 if (!this.ticking) {
76 this.logger.debug('RESUMING TIMER FOR ' + this.currentTimeInMillis + 'ms');
77 this.start = Date.now();
78 this.totalTime = this.currentTimeInMillis;
79 const expected = Date.now() + this.tickInterval;
80 const instance = this;
81 this.ticking = setTimeout(function () {
82 stepFn(
83 instance,
84 expected
85 );
86 }, this.tickInterval);
87
88 return this.timesUpPromise;
89 }
90 }
91}
92
93function convertFromMinutesToMilliseconds (minutes) {

Callers 3

handleTimerCommandFunction · 0.80
GameManagerClass · 0.80

Calls 1

stepFnFunction · 0.70

Tested by

no test coverage detected