std-embedded-time

Crates.iostd-embedded-time
lib.rsstd-embedded-time
version0.1.0
sourcesrc
created_at2021-08-20 11:41:03.021081
updated_at2021-08-20 11:41:03.021081
descriptionImplementation of embedded-time Clocks using std::time
homepage
repositoryhttps://github.com/quartiq/std-embedded-time
max_upload_size
id439956
size9,022
Robert Jördens (jordens)

documentation

https://docs.rs/std-embedded-time

README

std-embedded-time

Provides an embedded-time::Clock 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:

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);
}
Commit count: 5

cargo fmt