Use global Performance instance in createPerformanceLogger (#37337)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37337

Changelog: [Internal]

Removes usage of a local `Performance` instance, since this the global one is now safe to use.

Reviewed By: christophpurrer

Differential Revision: D45697243

fbshipit-source-id: 4f3f9798e79c15295094d5a4650af04db2856f60
This commit is contained in:
Ruslan Shestopalyuk
2023-05-09 13:56:10 -07:00
committed by Facebook GitHub Bot
parent 19927867bb
commit c71fa46eb8
@@ -16,7 +16,6 @@ import type {
} from './IPerformanceLogger';
import * as Systrace from '../Performance/Systrace';
import Performance from '../WebPerformance/Performance';
import infoLog from './infoLog';
const _cookies: {[key: string]: number, ...} = {};
@@ -27,9 +26,6 @@ const PRINT_TO_CONSOLE: false = false; // Type as false to prevent accidentally
// used to separate these internally from other marks/measures
const WEB_PERFORMANCE_PREFIX = 'global_perf_';
// TODO: Remove once T143070419 is done
const performance = new Performance();
export const getCurrentTimestamp: () => number =
global.nativeQPLTimestamp ?? global.performance.now.bind(global.performance);