61 lines
1.7 KiB
JavaScript
61 lines
1.7 KiB
JavaScript
// Metro module 838 (f839).
|
|
import { safeDateNow, withRandomSafeContext } from "./Module831";
|
|
import { GLOBAL_OBJ } from "./Module821";
|
|
let c678_2, c678_4;
|
|
const dateTimestampInSeconds = function dateTimestampInSeconds() {
|
|
return safeDateNow() / 1000;
|
|
};
|
|
Object.defineProperty(exports, Symbol.toStringTag, {
|
|
value: "Module"
|
|
});
|
|
c678_4 = null;
|
|
export function browserPerformanceTimeOrigin() {
|
|
let r16;
|
|
let r4 = c678_4;
|
|
if (r4 === null) {
|
|
const performance2 = GLOBAL_OBJ.performance;
|
|
const now = performance2?.now;
|
|
L12: {
|
|
r16 = void 0;
|
|
if (now) {
|
|
const r20 = withRandomSafeContext(() => performance2.now());
|
|
const r24 = safeDateNow();
|
|
const timeOrigin2 = performance2.timeOrigin;
|
|
if (typeof timeOrigin2 === "number") {
|
|
const r30 = Math.abs(timeOrigin2 + r20 - r24);
|
|
r16 = timeOrigin2;
|
|
if (r30 < 300000) {
|
|
break L12;
|
|
}
|
|
}
|
|
let r33 = performance2.timing?.navigationStart;
|
|
if (!(typeof r33 === "number" && Math.abs(r33 + r20 - r24) < 300000)) {
|
|
r33 = r24 - r20;
|
|
}
|
|
r16 = r33;
|
|
}
|
|
}
|
|
c678_4 = r16;
|
|
r4 = r16;
|
|
}
|
|
return r4;
|
|
}
|
|
export { dateTimestampInSeconds };
|
|
export function timestampInSeconds() {
|
|
let r14;
|
|
let r2 = c678_2;
|
|
if (r2 == null) {
|
|
let timeOrigin;
|
|
const performance3 = GLOBAL_OBJ.performance;
|
|
if (performance3?.now && performance3.timeOrigin) {
|
|
timeOrigin = performance3.timeOrigin;
|
|
r14 = () => (timeOrigin + withRandomSafeContext(() => performance3.now())) / 1000;
|
|
} else {
|
|
r14 = dateTimestampInSeconds;
|
|
}
|
|
c678_2 = r14;
|
|
r2 = r14;
|
|
}
|
|
return r2();
|
|
}
|