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

Function format_short_time

crates/openshell-tui/src/ui/sandbox_logs.rs:389–399  ·  view source on GitHub ↗
(epoch_ms: i64)

Source from the content-addressed store, hash-verified

387}
388
389pub fn format_short_time(epoch_ms: i64) -> String {
390 if epoch_ms <= 0 {
391 return String::from("--:--:--");
392 }
393 let secs = epoch_ms / 1000;
394 let time_of_day = secs % 86400;
395 let hours = time_of_day / 3600;
396 let minutes = (time_of_day % 3600) / 60;
397 let seconds = time_of_day % 60;
398 format!("{hours:02}:{minutes:02}:{seconds:02}")
399}
400
401/// Format a log line as plain text for clipboard copy.
402///

Callers 3

draw_detail_popupFunction · 0.70
render_log_lineFunction · 0.70
format_log_line_plainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected