https://github.com/quartiq/std-embedded-time
https://github.com/quartiq/std-embedded-time
Last synced: 15 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/quartiq/std-embedded-time
- Owner: quartiq
- License: mit
- Created: 2021-08-20T10:26:24.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-08-20T11:39:08.000Z (almost 4 years ago)
- Last Synced: 2025-05-05T10:54:59.760Z (18 days ago)
- Language: Rust
- Size: 4.88 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# std-embedded-time
Provides an
[`embedded-time::Clock`](https://docs.rs/embedded-time/0.12.0/embedded_time/clock/trait.Clock.html)
using [`std::time`] so that `embedded-time` can eaisly be used in on-host testing.### Usage
It's extremely straight-forward to start using a clock:
```rust
use std_embedded_time::StandardClock;
use embedded_time::Clock;fn main() {
let clock = StandardClock::default();let now = clock.try_now().unwrap();
println!("Current time: {:?}", now);
}
```