MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / formatVttTimestamp

Function formatVttTimestamp

packages/cli/src/whisper/normalize.ts:286–289  ·  view source on GitHub ↗

Format VTT timestamp: seconds → 00:01:23.456

(seconds: number)

Source from the content-addressed store, hash-verified

284
285/** Format VTT timestamp: seconds → 00:01:23.456 */
286function formatVttTimestamp(seconds: number): string {
287 const { hours, minutes, wholeSeconds, milliseconds } = timestampParts(seconds);
288 return `${pad2(hours)}:${pad2(minutes)}:${pad2(wholeSeconds)}.${pad3(milliseconds)}`;
289}
290
291function round3(n: number): number {
292 return Math.round(n * 1000) / 1000;

Callers 1

formatVttFunction · 0.85

Calls 3

timestampPartsFunction · 0.85
pad3Function · 0.85
pad2Function · 0.70

Tested by

no test coverage detected