export function timeSampled(lc, numerator, denominator, cb, threshold = 0, prefix = () => '') {
    if (denominator > 0 && numerator % denominator === 0) {
        const start = performance.now();
        const result = cb();
        const duration = performance.now() - start;
        if (duration > threshold) {
            lc.warn?.(`${prefix()} duration: ${duration}ms`);
        }
        return result;
    }
    return cb();
}
//# sourceMappingURL=maybe-time.js.map