use std::ops::{Add, Sub}; #[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] pub struct Timestamp(pub i64); impl Add for Timestamp { type Output = Self; fn add(self, other: i64) -> Self { Self(self.0 + other) } } impl Sub for Timestamp { type Output = Self; fn sub(self, other: i64) -> Self { Self(self.0 - other) } }