pub fn format_duration(ms: i64) -> String
Format a duration in milliseconds as a human-readable string.