Usage

Measure an operation without relying on wall-clock changes.

tsx
// Measure an operation without relying on wall-clock changes.
const start = performance.now();
const response = await fetch('https://example.com/api/health');
console.log(response.status, performance.now() - start);

Properties and methods 2

NameTypeRequiredDescription
now() => numberYes—
timeOriginreadonlynumberYes—
now — method signatures

Signatures

ts
(): number

Parameters

No parameters.

Returns

number

Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.