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);

Signatures

ts
(input: string | URL, init?: RequestInit): Promise<Response>

Parameters

NameTypeRequiredDescription
inputstring | URLYes—
initRequestInitNo—

Returns

Promise<Response>

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