mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
14307b8212
Summary: Makes sure that the global (standard) `performance` instance is initialized to still both provide `Performance.now()` as before, but also allows for the newly implemented functionality from the WebPerf API, such as marks/measures. Changelog: [Internal] Reviewed By: christophpurrer Differential Revision: D42017812 fbshipit-source-id: ddbe79e91b45a84871de94018305f2a4536ada4b
16 lines
351 B
JavaScript
16 lines
351 B
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow strict
|
|
* @format
|
|
*/
|
|
|
|
import Performance from '../WebPerformance/Performance';
|
|
|
|
if (!global.performance) {
|
|
global.performance = new Performance();
|
|
}
|