diff --git a/src/header/delays.rs b/src/header/delays.rs index 33f1476..35add6c 100644 --- a/src/header/delays.rs +++ b/src/header/delays.rs @@ -28,6 +28,12 @@ impl Delay { Delay(value) } + pub const fn new_from_millis(value: u64) -> Self { + const NANOS_PER_MILLI: u64 = 1_000_000; + + Self::new_from_nanos(NANOS_PER_MILLI * value) + } + pub fn to_nanos(&self) -> u64 { self.0 }