@cap-js-community/event-queue
Advanced tools
Comparing version 0.1.52 to 0.1.53
{ | ||
"name": "@cap-js-community/event-queue", | ||
"version": "0.1.52", | ||
"version": "0.1.53", | ||
"description": "event queue for cds", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -5,2 +5,4 @@ "use strict"; | ||
const ALLOWED_SHIFT_IN_PROCENT = 0.1; | ||
class SetIntervalDriftSafe { | ||
@@ -23,4 +25,7 @@ #adjustedInterval; | ||
this.#expectedCycleTime = now + this.#interval; | ||
} else if (now + this.#interval - this.#nextTickScheduledFor < this.#interval) { | ||
this.#logger.info("overlapping ticks, skipping this run"); | ||
} else if ( | ||
Math.abs(now + this.#interval - this.#nextTickScheduledFor - this.#interval) > | ||
this.#interval * ALLOWED_SHIFT_IN_PROCENT | ||
) { | ||
this.#logger.log("overlapping ticks, skipping this run"); | ||
return; | ||
@@ -27,0 +32,0 @@ } else { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
112986
2404