diff options
author | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2025-06-10 18:32:56 +0900 |
---|---|---|
committer | Andreas Hindborg <a.hindborg@kernel.org> | 2025-06-16 15:02:29 +0200 |
commit | cc6d1098b4cca6ec8e659de8361457c59a90b583 (patch) | |
tree | 647d6bce3f674398736271d24c31370b05cec651 /rust/kernel/workqueue.rs | |
parent | 768dfbfc98e26cfad45f7165a1801d188f3cbd81 (diff) |
rust: time: Add ktime_get() to ClockSource trait
Introduce the ktime_get() associated function to the ClockSource
trait, allowing each clock source to specify how it retrieves the
current time. This enables Instant::now() to be implemented
generically using the type-level ClockSource abstraction.
This change enhances the type safety and extensibility of timekeeping
by statically associating time retrieval mechanisms with their
respective clock types. It also reduces the reliance on hardcoded
clock logic within Instant.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Link: https://lore.kernel.org/r/20250610093258.3435874-4-fujita.tomonori@gmail.com
Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
Diffstat (limited to 'rust/kernel/workqueue.rs')
0 files changed, 0 insertions, 0 deletions