diff options
author | 2025-04-24 04:28:54 +0900 | |
---|---|---|
committer | 2025-04-29 15:31:07 +0200 | |
commit | ddc671506458849c1a1c882208bbffed033e770c (patch) | |
tree | 5fb4c1589941abe1db5d01757b8a424ab2b48595 /rust/pin-init/internal/src | |
parent | rust: time: Introduce Delta type (diff) | |
download | linux-rng-ddc671506458849c1a1c882208bbffed033e770c.tar.xz linux-rng-ddc671506458849c1a1c882208bbffed033e770c.zip |
rust: time: Introduce Instant type
Introduce a type representing a specific point in time. We could use
the Ktime type but C's ktime_t is used for both timestamp and
timedelta. To avoid confusion, introduce a new Instant type for
timestamp.
Rename Ktime to Instant and modify their methods for timestamp.
Implement the subtraction operator for Instant:
Delta = Instant A - Instant B
Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Fiona Behrens <me@kloenk.dev>
Tested-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Link: https://lore.kernel.org/r/20250423192857.199712-5-fujita.tomonori@gmail.com
Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
Diffstat (limited to 'rust/pin-init/internal/src')
0 files changed, 0 insertions, 0 deletions