mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-26 13:39:41 +01:00
0cc456ba80
by storing indices (u8) in the queues instead of pointers (*mut u8) in the binary heap we store the baseline inline along with the index and the task name. Before we stored a pointer to the message and had to lookup the baseline when comparing two nodes in the heap.
14 lines
214 B
Rust
14 lines
214 B
Rust
use core::cmp::Ordering;
|
|
use core::{mem, ptr};
|
|
|
|
use instant::Instant;
|
|
|
|
#[doc(hidden)]
|
|
pub struct Node<T>
|
|
where
|
|
T: 'static,
|
|
{
|
|
#[cfg(feature = "timer-queue")]
|
|
pub baseline: Instant,
|
|
pub payload: T,
|
|
}
|