macro_rules! as_ms {
($x:expr) => { ... };
}Expand description
Converts total attoseconds (i128) → whole milliseconds (i128).
Equivalent to Dt::attos_to_ms.
Truncates toward zero.
§Examples
Example shows attos inputs being built with macros rather than counting attosecond zeros by hand.
use deep_time::macros::{as_ms, ms, us};
// an amount of attoseconds that is equal to
// −1.5 ms becomes −1 milliseconds
assert_eq!(as_ms!(-ms!(1) - us!(500)), -1);