function resolveProbeTiming
Since 0.4.0
resolveProbeTiming(runtime: IRuntimeServices): ProbeTiming

Resolves a probe's monotonic clock and timer surface from an injected IRuntimeServices.

Every member is bound to the runtime the caller passes. There is NO ambient performance.now()/Date.now() fallback: all time access outside packages/runtime must go through IRuntimeServices (AI_GUIDELINES §4.1 / §4.2), so a caller with no runtime to inject has no clock the probe may lawfully read. Pass the result straight into createCachedProbe: hrtime measures the TTL, and the timer pair bounds each probe.

Examples

Example 1

const probe = createCachedProbe({
  probe: () => client.ping().then(() => true, () => false),
  ...resolveProbeTiming(ctx.runtime),
});

Parameters

The runtime services (e.g. ctx.runtime on a plugin context, non-optional by contract)

Return Type

The timing surface, bound to runtime

Usage

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