mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-14 07:00:51 -04:00
fix(curriculum): clarify performance.now() precision and update quiz answer (#63694)
This commit is contained in:
@@ -35,7 +35,7 @@ const end = performance.now();
|
||||
console.log(`Execution time: ${end - start}ms`);
|
||||
```
|
||||
|
||||
This is more accurate than using `Date.now()` because it measures time in microseconds, avoiding clock drift issues. You can use it to track script execution time, event response delays and animation performance.
|
||||
This is more accurate than using `Date.now()` because it measures time in milliseconds with microsecond precision, avoiding clock drift issues. You can use it to track script execution time, event response delays, and animation performance.
|
||||
|
||||
Next, the Performance Timing API.
|
||||
|
||||
@@ -97,7 +97,7 @@ What is the main advantage of using `performance.now()` over `Date.now()`?
|
||||
|
||||
## --answers--
|
||||
|
||||
It's more accurate and measures time in microseconds.
|
||||
It's more accurate and measures time in milliseconds with microsecond precision.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user