1 unstable release

0.1.0 Jan 11, 2024

#2843 in Embedded development

Download history 4287/week @ 2025-03-08 4176/week @ 2025-03-15 3026/week @ 2025-03-22 2166/week @ 2025-03-29 2220/week @ 2025-04-05 2106/week @ 2025-04-12 1962/week @ 2025-04-19 2637/week @ 2025-04-26 2450/week @ 2025-05-03 3109/week @ 2025-05-10 4187/week @ 2025-05-17 3455/week @ 2025-05-24 4183/week @ 2025-05-31 4865/week @ 2025-06-07 4351/week @ 2025-06-14 4240/week @ 2025-06-21

18,118 downloads per month
Used in 51 crates (via rpk-firmware)

MIT/Apache

5KB

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

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.

Dependencies