MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / format_short_time

Function format_short_time

crates/openshell-tui/src/ui/sandbox_draft.rs:685–695  ·  view source on GitHub ↗
(epoch_ms: i64)

Source from the content-addressed store, hash-verified

683}
684
685fn format_short_time(epoch_ms: i64) -> String {
686 if epoch_ms <= 0 {
687 return String::from("--:--:--");
688 }
689 let secs = epoch_ms / 1000;
690 let time_of_day = secs % 86400;
691 let hours = time_of_day / 3600;
692 let minutes = (time_of_day % 3600) / 60;
693 let seconds = time_of_day % 60;
694 format!("{hours:02}:{minutes:02}:{seconds:02}")
695}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected