Re: [PATCH v1 2/5] rust: timer: Replace HrTimerMode enum with trait-based mode types

From: Andreas Hindborg
Date: Mon Jun 02 2025 - 08:54:14 EST


"FUJITA Tomonori" <fujita.tomonori@xxxxxxxxx> writes:

> Replace the `HrTimerMode` enum with a trait-based approach that uses
> zero-sized types to represent each mode of operation. Each mode now
> implements the `HrTimerMode` trait.
>
> This refactoring is a preparation for replacing raw `Ktime` in HrTimer
> with the `Instant` and `Delta` types, and for making `HrTimer` generic
> over a `ClockSource`.
>
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@xxxxxxxxx>


Reviewed-by: Andreas Hindborg <a.hindborg@xxxxxxxxxx>


Best regards,
Andreas Hindborg