MCPcopy
hub / github.com/continuedev/continue / formatTimestamp

Function formatTimestamp

core/llm/logFormatter.ts:29–41  ·  view source on GitHub ↗
(timestamp: number)

Source from the content-addressed store, hash-verified

27}
28
29function formatTimestamp(timestamp: number) {
30 const date = new Date(timestamp);
31
32 const hours = date.getUTCHours().toString().padStart(2, "0");
33 const minutes = date.getUTCMinutes().toString().padStart(2, "0");
34 const seconds = date.getUTCSeconds();
35 const milliseconds = date.getUTCMilliseconds();
36
37 // Format seconds with one decimal place
38 const secondsFormatted = `${seconds}.${Math.floor(milliseconds / 100)}`;
39
40 return `${hours}:${minutes}:${secondsFormatted.padStart(4, "0")}`;
41}
42
43/**
44 * A class that formats LLM log output as a human-readable stream.

Callers 1

formatTimestampMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected