반환된 값은 time origin (the PerformanceTiming.navigationStart property) 이후로 경과된 시간을 나타낸다. In a web worker, the time origin is the time that its execution context (e.g. thread or process) is created. In a window, it is the time that the user navigated (or confirmed navigation, if confirmation was needed) to the current document. Bear in mind the following points:

In dedicated workers created from a Window context, the value in the worker will be lower than performance.now() in the window who spawned that worker. It used to be the same as t0 of the main context, but this was changed.

In shared or service workers, the value in the worker might be higher than that of the main context because that window can be created after those workers.

Syntax

t = performance.now();

Example

Unlike other timing data available to JavaScript (for example Date.now), the timestamps returned by Performance.now() are not limited to one-millisecond resolution. Instead, they represent times as floating-point numbers with up to microsecond precision.

Also unlike Date.now(), the values returned by Performance.now() always increase at a constant rate, independent of the system clock (which might be adjusted manually or skewed by software like NTP). Otherwise, performance.timing.navigationStart + performance.now() will be approximately equal to Date.now().