UNPKG

recoder-code

Version:

🚀 AI-powered development platform - Chat with 32+ models, build projects, automate workflows. Free models included!

15 lines (12 loc) • 472 B
import { TimestampProvider } from '../types'; interface PerformanceTimestampProvider extends TimestampProvider { delegate: TimestampProvider | undefined; } export const performanceTimestampProvider: PerformanceTimestampProvider = { now() { // Use the variable rather than `this` so that the function can be called // without being bound to the provider. return (performanceTimestampProvider.delegate || performance).now(); }, delegate: undefined, };