pub trait DisplayUnixTimeStampExt {
// Required method
fn display_unix_timestamp(&self) -> DisplayUnixTimeStamp;
// Provided method
fn display_unix_timestamp_short(&self) -> DisplayUnixTimeStamp { ... }
}Expand description
Implement Display for Duration to display the duration since the UNIX epoch.
§Example
use std::time::Duration;
use display_more::DisplayUnixTimeStampExt;
let duration = Duration::from_millis(1723102819023);
assert_eq!(
duration.display_unix_timestamp().to_string(),
"2024-08-08T07:40:19.023000Z+0000"
);Required Methods§
fn display_unix_timestamp(&self) -> DisplayUnixTimeStamp
Provided Methods§
Sourcefn display_unix_timestamp_short(&self) -> DisplayUnixTimeStamp
fn display_unix_timestamp_short(&self) -> DisplayUnixTimeStamp
Display the duration since the UNIX epoch in milliseconds without timezone.