aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/rust/helpers/time.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@gmail.com>2025-06-10 22:28:21 +0900
committerAndreas Hindborg <a.hindborg@kernel.org>2025-06-24 19:52:47 +0200
commitd9fc00dc73542eef98db74085447c57174ca290d (patch)
tree5b3c3f06c0c96698d02a6f6759148a502afec7f0 /rust/helpers/time.c
parentrust: time: Replace HrTimerMode enum with trait-based mode types (diff)
downloadwireguard-linux-d9fc00dc73542eef98db74085447c57174ca290d.tar.xz
wireguard-linux-d9fc00dc73542eef98db74085447c57174ca290d.zip
rust: time: Add HrTimerExpires trait
Introduce the `HrTimerExpires` trait to represent types that can be used as expiration values for high-resolution timers. Define a required method, `into_nanos()`, which returns the expiration time as a raw nanosecond value suitable for use with C's hrtimer APIs. Also extend the `HrTimerMode` to use the `HrTimerExpires` trait. This refactoring is a preparation for enabling hrtimer code to work uniformly with both absolute and relative expiration modes. Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org> Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com> Link: https://lore.kernel.org/r/20250610132823.3457263-4-fujita.tomonori@gmail.com [ changed conversion method names to `as_*` - Andreas ] Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
Diffstat (limited to 'rust/helpers/time.c')
0 files changed, 0 insertions, 0 deletions