Cache performanceNow method

Summary: Changelog: [Internal]

Reviewed By: lenaic

Differential Revision: D72410946

fbshipit-source-id: 7097e7bf6ac613adccce7fe1267fb70785f976b3
This commit is contained in:
Pieter De Baets
2025-04-04 03:21:08 -07:00
committed by Facebook GitHub Bot
parent 43a0bddd74
commit 007cefd94e
2 changed files with 2 additions and 4 deletions
@@ -9863,7 +9863,7 @@ declare export default class Performance {
endMark?: string
): PerformanceMeasure;
clearMeasures(measureName?: string): void;
now(): DOMHighResTimeStamp;
now: () => DOMHighResTimeStamp;
getEntries(): PerformanceEntryList;
getEntriesByType(entryType: PerformanceEntryType): PerformanceEntryList;
getEntriesByName(
@@ -226,9 +226,7 @@ export default class Performance {
* Returns a double, measured in milliseconds.
* https://developer.mozilla.org/en-US/docs/Web/API/Performance/now
*/
now(): DOMHighResTimeStamp {
return getCurrentTimeStamp();
}
now: () => DOMHighResTimeStamp = getCurrentTimeStamp;
/**
* An extension that allows to get back to JS all currently logged marks/measures