1 unstable release

0.1.0 Jan 11, 2024

#2319 in Embedded development

Download history 5416/week @ 2024-10-09 6803/week @ 2024-10-16 5349/week @ 2024-10-23 7463/week @ 2024-10-30 7371/week @ 2024-11-06 7016/week @ 2024-11-13 9475/week @ 2024-11-20 6971/week @ 2024-11-27 5772/week @ 2024-12-04 6586/week @ 2024-12-11 9957/week @ 2024-12-18 5586/week @ 2024-12-25 8678/week @ 2025-01-01 11151/week @ 2025-01-08 6578/week @ 2025-01-15 4296/week @ 2025-01-22

31,429 downloads per month
Used in 66 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