decord/alpha/source/utils/native/TimeUtils.tsx

36 lines
1.1 KiB
TypeScript
Raw Permalink Normal View History

2026-10-12 06:59:38 +00:00
// Module ID: 7787
// Function ID: 7788
// Name: utils/TimeUtils
2026-07-23 10:11:24 +00:00
// Dependencies: [2]
2026-07-20 16:05:17 +00:00
// Exports: getTimeFormat
2026-10-12 06:59:38 +00:00
// Module 7787 (utils/TimeUtils)
import size from "module_2" /* 2 */;
2026-08-24 06:08:38 +00:00
let result = size.fileFinishedImporting("utils/native/TimeUtils.tsx");
2026-07-20 16:05:17 +00:00
export const getTimeFormat = function getTimeFormat(playableDuration, padMinutes) {
padMinutes = undefined;
2026-07-29 08:29:29 +00:00
if (padMinutes != null) {
2026-07-20 16:05:17 +00:00
padMinutes = padMinutes.padMinutes;
}
2026-07-29 08:29:29 +00:00
const result = tmp % 60;
const result1 = (tmp - result) / 60;
if (padMinutes != null) {
2026-10-03 08:58:59 +00:00
let combined;
2026-07-20 16:05:17 +00:00
if (padMinutes) {
const _String = String;
const _String2 = String;
const StringResult = String(result1);
const _HermesInternal = HermesInternal;
2026-10-03 08:58:59 +00:00
const padStartResult = StringResult.padStart(2, "0");
2026-07-20 16:05:17 +00:00
const StringResult1 = String(result);
2026-10-03 08:58:59 +00:00
combined = "" + padStartResult + ":" + StringResult1.padStart(2, "0");
2026-07-20 16:05:17 +00:00
}
return combined;
}
const StringResult2 = String(result1);
2026-10-03 08:58:59 +00:00
const StringResult3 = String(result);
combined = "" + StringResult2 + ":" + StringResult3.padStart(2, "0");
2026-07-20 16:05:17 +00:00
};