From 74872be987835962c2a39a544e059996cce0a9e6 Mon Sep 17 00:00:00 2001 From: nazo6 Date: Sat, 30 Nov 2024 15:46:32 +0900 Subject: [PATCH] fix: u16 is not enough --- lib/rktk-keymanager/src/time.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rktk-keymanager/src/time.rs b/lib/rktk-keymanager/src/time.rs index 8d4ba67a..7a6b97e3 100644 --- a/lib/rktk-keymanager/src/time.rs +++ b/lib/rktk-keymanager/src/time.rs @@ -4,13 +4,13 @@ pub use core::time::Duration; #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)] pub struct Instant { /// Time from start in milliseconds. - from_start: u16, + from_start: u32, } impl Instant { pub const fn from_start(from_start: core::time::Duration) -> Self { Self { - from_start: from_start.as_millis() as u16, + from_start: from_start.as_millis() as u32, } } } @@ -19,7 +19,7 @@ impl Add for Instant { type Output = Self; fn add(self, rhs: Duration) -> Self { Self { - from_start: self.from_start + rhs.as_millis() as u16, + from_start: self.from_start + rhs.as_millis() as u32, } } }