[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0b6b8e54-8364-4d97-be1d-c53416564f8e@lunn.ch>
Date: Sat, 26 Oct 2024 00:33:42 +0200
From: Andrew Lunn <andrew@...n.ch>
To: FUJITA Tomonori <fujita.tomonori@...il.com>
Cc: anna-maria@...utronix.de, frederic@...nel.org, tglx@...utronix.de,
jstultz@...gle.com, sboyd@...nel.org, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, rust-for-linux@...r.kernel.org,
hkallweit1@...il.com, tmgross@...ch.edu, ojeda@...nel.org,
alex.gaynor@...il.com, gary@...yguo.net, bjorn3_gh@...tonmail.com,
benno.lossin@...ton.me, a.hindborg@...sung.com,
aliceryhl@...gle.com, arnd@...db.de
Subject: Re: [PATCH v4 2/7] rust: time: Introduce Delta type
> + /// Return the number of nanoseconds in the `Delta`.
> + #[inline]
> + pub fn as_nanos(self) -> i64 {
> + self.nanos
> + }
> +
> + /// Return the smallest number of microseconds greater than or equal
> + /// to the value in the `Delta`.
> + #[inline]
> + pub fn as_micros_ceil(self) -> i64 {
> + self.as_nanos().saturating_add(NSEC_PER_USEC - 1) / NSEC_PER_USEC
> + }
Thanks for dropping all the unsued as_foo helpers, and adding just the
one needed.
Reviewed-by: Andrew Lunn <andrew@...n.ch>
Andrew
Powered by blists - more mailing lists