#date-time #testing #time #embedded-time

dev std-embedded-time

Implementation of embedded-time Clocks using std::time

1 unstable release

0.1.0 Aug 20, 2021

#2134 in Embedded development

Download history 341/week @ 2024-12-13 125/week @ 2024-12-20 88/week @ 2024-12-27 280/week @ 2025-01-03 542/week @ 2025-01-10 498/week @ 2025-01-17 448/week @ 2025-01-24 552/week @ 2025-01-31 659/week @ 2025-02-07 647/week @ 2025-02-14 596/week @ 2025-02-21 697/week @ 2025-02-28 636/week @ 2025-03-07 796/week @ 2025-03-14 920/week @ 2025-03-21 876/week @ 2025-03-28

3,335 downloads per month
Used in 6 crates

Custom license

5KB

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);
}

Dependencies

~600KB
~11K SLoC