Skip to content
Snippets Groups Projects
Commit 8f0e9944 authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by Daniel Almeida
Browse files

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: default avatarBoqun Feng <boqun.feng@gmail.com>
Reviewed-by: default avatarGary Guo <gary@garyguo.net>
Reviewed-by: default avatarFiona Behrens <me@kloenk.dev>
Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@gmail.com>
parent bbee89c0
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment