"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCurrentTimeInHighPrecision = exports.sleep = void 0;
const polyfill_1 = require("@js-temporal/polyfill");
/**
 * sleeps for the desired duration
 * @param durationInMillisecond the desired amount of sleep time
 * @returns when the provided duration has passed
 */
function sleep(durationInMillisecond) {
    return new Promise(resolve => setTimeout(resolve, durationInMillisecond));
}
exports.sleep = sleep;
/**
 * returns an UTC ISO-8601 timestamp with microsecond precision
 * using @js-temporal/polyfill
 */
function getCurrentTimeInHighPrecision() {
    return polyfill_1.Temporal.Now.instant().toString({ smallestUnit: 'microseconds' });
}
exports.getCurrentTimeInHighPrecision = getCurrentTimeInHighPrecision;
//# sourceMappingURL=time.js.map