dirbaio[m]: > <@dirbaio:matrix.org> perhaps this? > > ```rust > struct OverflowError; > > trait Duration: Copy + Eq + PartialEq + Hash + Add + Sub + Mul + Div { > fn from_secs(secs: u32) -> Result; > fn from_millis(millis: u32) -> Result; > fn from_micros(micros: u32) -> Result; > fn as_secs(self) -> Result; > fn as_millis(self) -> Result; > fn as_micros(self) -> Result; > } > > trait Timer { > type Duration: Duration; > /// Starts or restarts the timer at 0 > fn start(&mut self); > fn read(&mut self) -> Result; > } > ``` Should Duration be a trait? Idk... Maybe? There are pros to mandating u32 or u64 for it with a concrete type (or even just use the core lib Duration type?)