performance.now
performance.now()
The returned value represents the time elapsed since the time origin.
Example
const t0 = performance.now();
doSomething();
const t1 = performance.now();
console.log(`Call to doSomething took ${t1 - t0} milliseconds.`);
Copy to Clipboard
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()
.
performance.now() => system clock에 의해서 측정되는 timestamp 수치 (microsecond precision).
Author And Source
이 문제에 관하여(performance.now), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://velog.io/@hqillz/performance.now저자 귀속: 원작자 정보가 원작자 URL에 포함되어 있으며 저작권은 원작자 소유입니다.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)