/* Metro module 6487; source: unknown; dependencies: [6374, 6375, 6488] */ import ClassCallCheck from './module-06374-ClassCallCheck.js'; /* Metro dependency 6374 */ import CreateClass from './module-06375-CreateClass.js'; /* Metro dependency 6375 */ function _fun51086(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6665:6, offset: 0x01228c1a, size: 104 bytes, params: 8, frame: 18 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); exports.JSFPSMonitor = _fun51087(); function _fun51087() { // fn#51087, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6665:118, offset: 0x01228c82, size: 101 bytes, params: 1, frame: 15 return CreateClass(JSFPSMonitor, [{key: 'measureLoop', value: function() { this.clearAnimationNumber = global.requestAnimationFrame(this.updateLoopCompute); }}, {key: 'startTracking', value: function() { var property; if (this.startTime !== 0) { throw new global.Error('This FPS Monitor has already been run, please create a new instance'); } this.startTime = global.Date.now(); property = this.timeWindow; var Date = global.Date; property.startTime = Date.now(); this.measureLoop(); }}, {key: 'stopAndGetData', value: value_51092}]); function JSFPSMonitor() { // fn#51088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6665:139, offset: 0x01228ce7, size: 116 bytes, params: 1, frame: 14 env1_2(this, JSFPSMonitor); this.startTime = 0; this.frameCount = 0; this.timeWindow = {'frameCount': 0, 'startTime': 0}; const Number = global.Number; const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER; this.minFPS = MAX_SAFE_INTEGER; this.maxFPS = 0; this.averageFPS = 0; this.clearAnimationNumber = 0; this.updateLoopCompute = updateLoopCompute; function updateLoopCompute() { // fn#51089, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6665:392, owner: JSFPSMonitor.updateLoopCompute, offset: 0x01228d5b, size: 289 bytes, params: 1, frame: 17 var value8; var Math; let binding = env0_0; let frameCount = binding.frameCount; binding.frameCount = typeof frameCount === 'bigint' ? frameCount + 1n : +frameCount + 1; let Date = global.Date; const value3 = (Date.now() - binding.startTime) / 1000; const value4 = 0; binding.averageFPS = value3 > value4 ? env0_0.frameCount / value3 : value4; binding = env0_0; let timeWindow = binding.timeWindow; frameCount = timeWindow.frameCount; timeWindow.frameCount = typeof frameCount === 'bigint' ? frameCount + 1n : +frameCount + 1; Date = global.Date; const value7 = (Date.now() - binding.timeWindow.startTime) / 1000; if (value7 >= 1) { binding = env0_0; timeWindow = binding.timeWindow; value8 = timeWindow.frameCount / value7; Math = global.Math; binding.minFPS = Math.min(binding.minFPS, value8); Math = global.Math; binding.maxFPS = Math.max(binding.maxFPS, value8); timeWindow = binding.timeWindow; timeWindow.frameCount = value4; timeWindow = binding.timeWindow; timeWindow.startTime = global.Date.now(); } env0_0.measureLoop(); } } function value_51092() { // fn#51092, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6665:1135, offset: 0x01228f0f, size: 187 bytes, params: 1, frame: 19 var averageFPS; global.cancelAnimationFrame(this.clearAnimationNumber); const minFPS = this.minFPS; const Number = global.Number; const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER; if (minFPS === MAX_SAFE_INTEGER) { averageFPS = this.averageFPS; this.minFPS = averageFPS; averageFPS = this.averageFPS; this.maxFPS = averageFPS; } const object = {}; let value = environment.__proto__; value = require(6488) /* metro dependency 6488 */; object.minFPS = value.roundToDecimalPlaces(this.minFPS, 1); value = require(6488) /* metro dependency 6488 */; object.maxFPS = value.roundToDecimalPlaces(this.maxFPS, 1); value = require(6488) /* metro dependency 6488 */; object.averageFPS = value.roundToDecimalPlaces(this.averageFPS, 1); return object; } } } global.__d(_fun51086, 6487, [6374, 6375, 6488]) /* metro module 6487, dependencies: [6374, 6375, 6488] */;