mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-09-17 05:16:19 -07:00
- Generate Japanese SRTs through the overlay modal or launcher - Support managed whisper.cpp models and optional dialogue detection
8 lines
446 B
TypeScript
8 lines
446 B
TypeScript
export function formatTimestamp(milliseconds: number): string {
|
|
const rounded = Math.max(0, Math.round(milliseconds));
|
|
const hours = Math.floor(rounded / 3600000);
|
|
const minutes = Math.floor((rounded % 3600000) / 60000);
|
|
const seconds = Math.floor((rounded % 60000) / 1000);
|
|
return `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')},${String(rounded % 1000).padStart(3, '0')}`;
|
|
}
|