Files
discord-decomp/sources/by-id/module-06487.jsx
T
2026-07-27 16:20:00 +03:00

64 lines
3.1 KiB
React

/* Metro module 6487; source: unknown; dependencies: [6374, 6375, 6488] */
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});
const env0_2 = importDefault(6374) /* metro dependency 6374 */;
const env0_3 = importDefault(6375) /* metro dependency 6375 */;
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 env0_3(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 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 object2 = {};
let value = environment.__proto__;
value = require(6488) /* metro dependency 6488 */;
object2.minFPS = value.roundToDecimalPlaces(this.minFPS, 1);
value = require(6488) /* metro dependency 6488 */;
object2.maxFPS = value.roundToDecimalPlaces(this.maxFPS, 1);
value = require(6488) /* metro dependency 6488 */;
object2.averageFPS = value.roundToDecimalPlaces(this.averageFPS, 1);
return object2;
}