amqp-connection-manager
Version:
Auto-reconnect and round robin support for amqplib.
14 lines (13 loc) • 364 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.wait = void 0;
function wait(timeInMs) {
let timeoutHandle;
return {
promise: new Promise(function (resolve) {
timeoutHandle = setTimeout(resolve, timeInMs);
}),
cancel: () => clearTimeout(timeoutHandle),
};
}
exports.wait = wait;
;