"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.timed = exports.timedWith = exports.timedWith_ = void 0;
// ets_tracing: off
const Clock_1 = require("../Clock");
const summarized_1 = require("./summarized");
/**
 * A more powerful variation of `timed` that allows specifying the clock.
 */
function timedWith_(self, msTime, __trace) {
    return (0, summarized_1.summarized_)(self, msTime, (start, end) => end - start, __trace);
}
exports.timedWith_ = timedWith_;
/**
 * A more powerful variation of `timed` that allows specifying the clock.
 *
 * @ets_data_first timedWith_
 */
function timedWith(msTime, __trace) {
    return (self) => timedWith_(self, msTime, __trace);
}
exports.timedWith = timedWith;
/**
 * Returns a new effect that executes this one and times the execution.
 */
function timed(self, __trace) {
    return timedWith_(self, Clock_1.currentTime, __trace);
}
exports.timed = timed;
//# sourceMappingURL=timed.js.map