use jiff::Timestamp;
pub(crate) fn timestamp_to_f64(ts: Timestamp) -> f64 {
ts.as_duration().as_secs_f64()
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn after_2038() {
let ts = Timestamp::new(4_000_000_000, 500_000_000).unwrap();
assert!((timestamp_to_f64(ts) - 4_000_000_000.5).abs() < 1e-6);
}
}