TS-Scribe - v1.2.0
    Preparing search index...

    Type Alias CreatePerfTimerOptions

    Options accepted by createPerfTimer.

    type CreatePerfTimerOptions = {
        label?: string;
        log?: boolean;
        onLap?: (lap: PerfTimerLap) => void;
        onStop?: (result: PerfTimerResult) => void;
    }
    Index

    Properties

    label?: string

    A label prepended to every console message when log is true. Defaults to 'createPerfTimer'.

    log?: boolean

    When true, each PerfTimer.lap and PerfTimer.stop call prints a formatted line to console.log. Defaults to false.

    onLap?: (lap: PerfTimerLap) => void

    Called after each PerfTimer.lap with the PerfTimerLap that was just recorded. Errors thrown by this callback are silently swallowed so they never propagate to the caller.

    onStop?: (result: PerfTimerResult) => void

    Called each time PerfTimer.stop is invoked with the PerfTimerResult snapshot. Errors thrown by this callback are silently swallowed so they never propagate to the caller.