@nxtedition/lib 21.3.8 → 21.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app.js +2 -2
- package/package.json +1 -1
- package/timers.js +7 -5
package/app.js
CHANGED
|
@@ -281,9 +281,9 @@ export function makeApp(appConfig, onTerminate) {
|
|
|
281
281
|
histogram.reset()
|
|
282
282
|
|
|
283
283
|
if (currentLag > 1e3) {
|
|
284
|
-
logger?.error({ currentLag }, 'lag')
|
|
284
|
+
logger?.error({ currentLag, elapsedTime: currentLag }, 'lag')
|
|
285
285
|
} else if (currentLag > maxLag) {
|
|
286
|
-
logger?.warn({ currentLag }, 'lag')
|
|
286
|
+
logger?.warn({ currentLag, elapsedTime: currentLag }, 'lag')
|
|
287
287
|
}
|
|
288
288
|
|
|
289
289
|
currentLag$.next(currentLag)
|
package/package.json
CHANGED
package/timers.js
CHANGED
|
@@ -40,8 +40,8 @@ function refreshTimeout() {
|
|
|
40
40
|
if (fastNowTimeout && fastNowTimeout.refresh) {
|
|
41
41
|
fastNowTimeout.refresh()
|
|
42
42
|
} else {
|
|
43
|
-
clearTimeout(fastNowTimeout)
|
|
44
|
-
fastNowTimeout = setTimeout(onTimeout, 500)
|
|
43
|
+
global.clearTimeout(fastNowTimeout)
|
|
44
|
+
fastNowTimeout = global.setTimeout(onTimeout, 500)
|
|
45
45
|
if (fastNowTimeout.unref) {
|
|
46
46
|
fastNowTimeout.unref()
|
|
47
47
|
}
|
|
@@ -80,13 +80,15 @@ class Timeout {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
export function setTimeout(callback, delay, opaque) {
|
|
83
|
-
return delay < 1e3
|
|
83
|
+
return delay < 1e3
|
|
84
|
+
? global.setTimeout(callback, delay, opaque)
|
|
85
|
+
: new Timeout(callback, delay, opaque)
|
|
84
86
|
}
|
|
85
87
|
|
|
86
88
|
export function clearTimeout(timeout) {
|
|
87
89
|
if (timeout instanceof Timeout) {
|
|
88
90
|
timeout.clear()
|
|
89
|
-
} else {
|
|
90
|
-
clearTimeout(timeout)
|
|
91
|
+
} else if (timeout == null) {
|
|
92
|
+
global.clearTimeout(timeout)
|
|
91
93
|
}
|
|
92
94
|
}
|