/**
 * Timer utilities for measuring execution time
 */
/**
 * Create a high-precision timer
 */
export function createTimer() {
    let startTime = 0;
    let endTime = 0;
    return {
        start() {
            startTime = Date.now();
            endTime = 0;
        },
        end() {
            endTime = Date.now();
            return endTime - startTime;
        },
        getElapsed() {
            const currentTime = endTime || Date.now();
            return currentTime - startTime;
        },
        format() {
            const elapsed = this.getElapsed();
            return (elapsed / 1000).toFixed(2) + 's';
        },
    };
}
//# sourceMappingURL=timer.js.map