[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72n-++roTv3yDNOA=Mi_sscBZX3xPdZ6RZ0Oxx+T82pf5A@mail.gmail.com>
Date: Tue, 21 Feb 2023 23:29:21 +0100
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Asahi Lina <lina@...hilina.net>, Boqun Feng <boqun.feng@...il.com>,
Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Wedson Almeida Filho <wedsonaf@...il.com>,
Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
John Stultz <jstultz@...gle.com>,
Stephen Boyd <sboyd@...nel.org>, linux-kernel@...r.kernel.org,
rust-for-linux@...r.kernel.org, asahi@...ts.linux.dev
Subject: Re: [PATCH] rust: time: New module for timekeeping functions
On Tue, Feb 21, 2023 at 7:45 PM Thomas Gleixner <tglx@...utronix.de> wrote:
>
> But xb abd xr are the same datatype because they represent a time delta.
In principle, one could also have different duration types too. For
instance, C++'s `std::chrono::duration` type is parametrized on the
representation type and the tick period, and thus an operation between
two time points like t1 - t0 returns a duration type that depends on
the type of the time points, i.e. which clock they were obtained from.
Cheers,
Miguel
Powered by blists - more mailing lists