interface ProbeTiming
Since 0.4.0

The clock-and-timer surface createCachedProbe runs on, bound to a runtime.

Properties

readonly
hrtime: () => number

Monotonic clock in milliseconds — the runtime's hrtime. Measures the cache TTL as an interval, never a wall-clock reading.

readonly
setTimer: (
fn: () => void,
ms: number
) => TimerHandle

Timer used to bound each probe — the runtime's setTimeout.

readonly
clearTimer: (handle: TimerHandle) => void

Cancels a timer created by ProbeTiming.setTimer — the runtime's clearTimeout.

Usage

import { type ProbeTiming } from "common/src/index.ts";