NAME
Linux::Event::Scheduler - Internal monotonic timer queue for Linux::Event::Reactor
DESCRIPTION
Linux::Event::Scheduler is the internal deadline queue used by the reactor. It stores callbacks keyed by monotonic nanosecond deadlines and returns expired items in deadline order.
This module is internal. Its API is documented only to explain the structure of this distribution, not as a stable user-facing contract.
METHODS
new(clock => $clock)
Create a scheduler bound to a clock object that provides now_ns and deadline_in_ns.
after_ns($delta_ns, $cb)
Schedule a callback relative to the current time.
at_ns($deadline_ns, $cb)
Schedule a callback for an absolute monotonic deadline.
cancel($id)
Cancel an existing timer by id.
next_deadline_ns
Return the next live deadline, if any.
pop_expired
Return all expired entries as [ $id, $cb, $deadline_ns ] tuples.
SEE ALSO
Linux::Event::Reactor, Linux::Event::Clock, Linux::Event::Timer