rtic/src/node.rs
Jorge Aparicio 0cc456ba80 reduce memory overhead
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.
2018-05-04 10:59:23 +02:00

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,
}