import { notImplemented } from "./_utils.ts";
const { PerformanceObserver, PerformanceEntry, performance: shimPerformance } = globalThis as typeof globalThis & { PerformanceEntry: PerformanceEntry; PerformanceObserver: any; };const constants = {};
const performance: & Omit< Performance, "clearMeasures" | "getEntries" | "getEntriesByName" | "getEntriesByType" > & { eventLoopUtilization: any; nodeTiming: Record<string, string>; timerify: any; timeOrigin: any; } = { clearMarks: (markName: string) => shimPerformance.clearMarks(markName), eventLoopUtilization: () => notImplemented("eventLoopUtilization from performance"), mark: (markName: string) => shimPerformance.mark(markName), measure: ( measureName: string, startMark?: string | PerformanceMeasureOptions, endMark?: string, ): PerformanceMeasure => { if (endMark) { return shimPerformance.measure( measureName, startMark as string, endMark, ); } else { return shimPerformance.measure( measureName, startMark as PerformanceMeasureOptions, ); } }, nodeTiming: {}, now: () => shimPerformance.now(), timerify: () => notImplemented("timerify from performance"), timeOrigin: (shimPerformance as any).timeOrigin, toJSON: () => shimPerformance.toJSON(), };
const monitorEventLoopDelay = () => notImplemented( "monitorEventLoopDelay from performance", );
export default { performance, PerformanceObserver, PerformanceEntry, monitorEventLoopDelay, constants,};
export { constants, monitorEventLoopDelay, performance, PerformanceEntry, PerformanceObserver,};