fn align_ts(ts: i64, interval: Duration) -> i64
Align the timestamp to the nearest interval.
Panics if interval as milliseconds is zero.
interval