1 unstable release

0.1.0 Jan 11, 2024

#2353 in Embedded development

Download history 8399/week @ 2024-11-18 8067/week @ 2024-11-25 6181/week @ 2024-12-02 5449/week @ 2024-12-09 10958/week @ 2024-12-16 5765/week @ 2024-12-23 6889/week @ 2024-12-30 11008/week @ 2025-01-06 8666/week @ 2025-01-13 4963/week @ 2025-01-20 4152/week @ 2025-01-27 5625/week @ 2025-02-03 4913/week @ 2025-02-10 4694/week @ 2025-02-17 4437/week @ 2025-02-24 3591/week @ 2025-03-03

18,105 downloads per month
Used in 62 crates (via rpk-firmware)

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