Messages in this thread | | | From | Miguel Ojeda <> | Date | Tue, 21 Feb 2023 23:29:21 +0100 | Subject | Re: [PATCH] rust: time: New module for timekeeping functions |
| |
On Tue, Feb 21, 2023 at 7:45 PM Thomas Gleixner <tglx@linutronix.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
| |