global.performance
now() is milliseconds since the app's JS runtime started, on a monotonic clock.
Usage
Measure an operation without relying on wall-clock changes.
// 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
| Name | Type | Required | Description |
|---|---|---|---|
now | () => number | Yes | — |
timeOriginreadonly | number | Yes | — |
now — method signatures
Signatures
(): numberParameters
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.