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