MCPcopy
hub / github.com/bee-queue/bee-queue / _trigger

Method _trigger

lib/eager-timer.js:71–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69 }
70
71 _trigger() {
72 const now = Date.now(),
73 remaining = this._nextTime - now;
74 /* istanbul ignore if */
75 if (remaining > 0) {
76 // It's possible (it caused tests to fail) to have the timeout trigger
77 // before the scheduled time.
78 this._timer = setTimeout(this._boundTrigger, remaining);
79 return;
80 }
81 this._schedule(now + this._maxDelay);
82 this.emit('trigger');
83 }
84}
85
86module.exports = EagerTimer;

Callers

nothing calls this directly

Calls 1

_scheduleMethod · 0.95

Tested by

no test coverage detected