pw_time#
Robust time, instants, and durations for multiple clock domains
Experimental Rust
pw_time is a Rust Pigweed module that provides time types and clock domain
facilities specifically tailored for embedded systems, with a strong focus on portability,
correctness, and type safety.
The module allows type-safe handling of systems with multiple clock domains. Instants and durations are associated with a specific clock domain at compile-time, preventing developers from accidentally mixing times from different clocks.
API reference#
Refer to the rustdoc API docs for detailed documentation of the
pw_time Rust API.
Get started#
To use pw_time, add it as a dependency in your BUILD.bazel file:
deps = [
"//pw_time/rust:pw_time",
]
And import the types in your Rust source code:
use pw_time::{Clock, Instant, Duration};