1 unstable release

0.1.0 Jan 11, 2024

#2134 in Embedded development

Download history 5425/week @ 2024-07-21 4837/week @ 2024-07-28 5517/week @ 2024-08-04 6757/week @ 2024-08-11 5717/week @ 2024-08-18 11142/week @ 2024-08-25 12109/week @ 2024-09-01 9556/week @ 2024-09-08 9793/week @ 2024-09-15 9271/week @ 2024-09-22 5219/week @ 2024-09-29 5558/week @ 2024-10-06 5653/week @ 2024-10-13 6339/week @ 2024-10-20 6274/week @ 2024-10-27 8326/week @ 2024-11-03

26,936 downloads per month
Used in 82 crates (3 directly)

MIT/Apache

5KB

embassy-time-queue-driver

This crate contains the driver trait used by the embassy-time timer queue.

You should rarely need to use this crate directly. Only use it when implementing your own timer queue.

There is two timer queue implementations, one in embassy-time enabled by the generic-queue feature, and another in embassy-executor enabled by the integrated-timers feature.


lib.rs:

Implementing a timer queue

Example

use core::task::Waker;

use embassy_time::Instant;
use embassy_time::queue::{TimerQueue};

struct MyTimerQueue{}; // not public!

impl TimerQueue for MyTimerQueue {
    fn schedule_wake(&'static self, at: u64, waker: &Waker) {
        todo!()
    }
}

embassy_time_queue_driver::timer_queue_impl!(static QUEUE: MyTimerQueue = MyTimerQueue{});

Dependencies