From: FUJITA Tomonori <tomo@flapping.org>
To: a.hindborg@kernel.org, boqun@kernel.org, ojeda@kernel.org
Cc: acourbot@nvidia.com, aliceryhl@google.com,
anna-maria@linutronix.de, bjorn3_gh@protonmail.com,
dakr@kernel.org, daniel.almeida@collabora.com,
frederic@kernel.org, gary@garyguo.net, jstultz@google.com,
lossin@kernel.org, lyude@redhat.com, mike@fireburn.co.uk,
sboyd@kernel.org, tamird@kernel.org, tglx@kernel.org,
tmgross@umich.edu, work@onurozkan.dev,
rust-for-linux@vger.kernel.org,
FUJITA Tomonori <fujita.tomonori@gmail.com>
Subject: [PATCH v1 0/2] rust: time: seconds based Instant
Date: Sat, 31 Oct 2026 09:33:32 +0900 [thread overview]
Message-ID: <20261031003334.4161188-1-tomo@flapping.org> (raw)
From: FUJITA Tomonori <fujita.tomonori@gmail.com>
Mike's series added a free function `ktime_get_real_seconds()` [1].
Andreas and Boqun preferred a seconds based `Instant` instead. This
series does that.
1/2 adds a unit type parameter to `Instant`, with no functional change.
2/2 adds the `Sec` unit and `ClockId::ktime_get_seconds()`.
`Instant<C, Sec>` has only `now()` and `as_secs()`; there is no
`Delta<Sec>`.
The `now()` doc comment in 1/2 changes the same line as [2]. Whichever
is applied first, the other conflicts on that one line only.
Based on rust-next.
[1] https://lore.kernel.org/rust-for-linux/20260826162851.2497-10-mike@fireburn.co.uk/
[2] https://lore.kernel.org/rust-for-linux/20261030044803.3863267-1-tomo@flapping.org/
FUJITA Tomonori (2):
rust: time: make Instant generic over the time unit
rust: time: add Instant in seconds
rust/helpers/time.c | 10 ++++
rust/kernel/time.rs | 123 +++++++++++++++++++++++++++++++++++++-------
2 files changed, 115 insertions(+), 18 deletions(-)
base-commit: d89e1d186ec9271bf78e62771779e9fc03bf0fc3
--
2.43.0
next reply other threads:[~2026-10-31 0:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-31 0:33 FUJITA Tomonori [this message]
2026-10-31 0:33 ` [PATCH v1 1/2] rust: time: make Instant generic over the time unit FUJITA Tomonori
2026-10-31 0:33 ` [PATCH v1 2/2] rust: time: add Instant in seconds FUJITA Tomonori
2026-10-31 3:56 ` [PATCH v1 0/2] rust: time: seconds based Instant Boqun Feng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261031003334.4161188-1-tomo@flapping.org \
--to=tomo@flapping.org \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=anna-maria@linutronix.de \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=frederic@kernel.org \
--cc=fujita.tomonori@gmail.com \
--cc=gary@garyguo.net \
--cc=jstultz@google.com \
--cc=lossin@kernel.org \
--cc=lyude@redhat.com \
--cc=mike@fireburn.co.uk \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=sboyd@kernel.org \
--cc=tamird@kernel.org \
--cc=tglx@kernel.org \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox