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