Struct rstubs::threading::sleep::BellRinger
source · pub struct BellRinger {
bells: ArrayDeque<Bell, APPS>,
}
Expand description
Manages and activates time-triggered activities.
The Bellringer is regularly activated and checks whether any of the bells should ring. The bells are stored in a queue that is managed by the Bellringer. A clever implementation avoids iterating through the whole list for every iteration by keeping the bells sorted and storing delta times. This approach leads to a complexity of O(1) for the method called by the timer interrupt in case no bells need to be rung.
Fields§
§bells: ArrayDeque<Bell, APPS>