43 lines
1.3 KiB
TypeScript
43 lines
1.3 KiB
TypeScript
// Metro module 13456 (f13457).
|
|
import { Systrace } from "react-native";
|
|
import { isAndroid } from "../../../utils/PlatformUtils";
|
|
import * as _Module13457 from "../../../_bundle/Module13457";
|
|
export function installSystrace() {
|
|
if (isAndroid()) {
|
|
Systrace.isEnabled = () => {
|
|
let r9 = _Module13457.default == null ? void 0 : _Module13457.default.isEnabled();
|
|
if (r9 == null) {
|
|
r9 = false;
|
|
}
|
|
return r9;
|
|
};
|
|
Systrace.beginEvent = (a0) => {
|
|
if (_Module13457.default != null) {
|
|
_Module13457.default.beginEvent(typeof a0 !== "string" ? a0() : a0);
|
|
}
|
|
};
|
|
Systrace.endEvent = () => {
|
|
if (_Module13457.default != null) {
|
|
_Module13457.default.endEvent();
|
|
}
|
|
};
|
|
Systrace.beginAsyncEvent = (a0) => {
|
|
let r12 = _Module13457.default == null ? void 0 : _Module13457.default.beginAsyncEvent(typeof a0 !== "string" ? a0() : a0);
|
|
if (r12 == null) {
|
|
r12 = 0;
|
|
}
|
|
return r12;
|
|
};
|
|
Systrace.endAsyncEvent = (a0, a1) => {
|
|
if (_Module13457.default != null) {
|
|
_Module13457.default.endAsyncEvent(typeof a0 !== "string" ? a0() : a0, a1);
|
|
}
|
|
};
|
|
Systrace.counterEvent = (a0, a1) => {
|
|
if (_Module13457.default != null) {
|
|
_Module13457.default.counterEvent(typeof a0 !== "string" ? a0() : a0, a1);
|
|
}
|
|
};
|
|
}
|
|
}
|