package colibri2
Time Wheel
Allows to add timestamp in the futur and get the next timestamp.
It should be (but not proved) amortized O(log(offset)) for adding an event to an offset in the futur and O(1) amortized to get the next elements
module type S = sig ... end
include S with type context := unit
val create : unit -> 'a t
val add : 'a t -> 'a -> int -> unit
add t v offset
add the event v at the given offset in the futur
val next : 'a t -> 'a option
val next_at_same_time : 'a t -> 'a option
val find_next : 'a t -> unit
val current_time : 'a t -> int
val size : 'a t -> int
val size_at_current_time : 'a t -> int
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>