(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

rust: time: add jiffies time unit for Delta

Add a Jiffy time unit with isize as its representation and provide Delta<Jiffy>::from_jiffies() and as_jiffies() as the unit-specific constructor and accessor, mirroring from_nanos()/as_nanos() on the nanosecond Delta. Represent the jiffies span as isize: Delta is a signed span (nanoseconds use i64) and, as a timeout, the value only needs to reach MAX_JIFFY_OFFSET ((LONG_MAX >> 1) - 1). isize is signed and matches the kernel's c_long, so it meets both. Reviewed-by: Gary Guo <gary@garyguo.net> Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com> Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org> Link: https://patch.msgid.link/20260808062839.1159990-3-tomo@flapping.org [ Added intra-doc links. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>


Author FUJITA Tomonori Committer Miguel Ojeda Date Commit Parent 2e2203d8
+26
1 changed file
+26
1 changed file