Re: [PATCH net-next v3 3/8] rust: time: Change output of Ktime's sub operation to Delta

From: Miguel Ojeda
Date: Thu Oct 17 2024 - 12:46:29 EST


On Thu, Oct 17, 2024 at 9:11 AM FUJITA Tomonori
<fujita.tomonori@xxxxxxxxx> wrote:
>
> Surely, we could create both Delta and Instant. What is Ktime used
> for? Both can simply use bindings::ktime_t like the followings?

I think it may help having 2 (public) types, rather than reusing the
`Ktime` name for one of them, because people may associate several
concepts to `ktime_t` which is what they know already, but I would
suggest mentioning in the docs clearly that these maps to usecase
subsets of `ktime_t` (whether we mention or not that they are
supposed to be `ktime_t`s is another thing, even if they are).

Whether we have a third private type internally for `Ktime` or not
does not matter much, so whatever is best for implementation purposes.
And if we do have a private `Ktime`, I would avoid making it public
unless there is a good reason for doing so.

Cheers,
Miguel