manan-data 0.0.0

inventyv tikv datalayer
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
'use strict';
const timers = require('node:timers');

Object.assign(exports, timers);
exports.now = Date.now;

// Any delay larger than this value is ignored by Node.js, with a delay of `1`
// used instead. See <https://nodejs.org/api/timers.html#settimeoutcallback-delay-args>.
const MAX_DELAY = (2 ** 31) - 1;

function setCappedTimeout(callback, delay) {
	const safeDelay = Math.min(delay, MAX_DELAY);
	return timers.setTimeout(callback, safeDelay);
}

exports.setCappedTimeout = setCappedTimeout;