class Timers::Events::Handle
Represents a cancellable handle for a specific timer event.
def <=> other
def <=> other @time <=> other.time end
def cancel!
def cancel! # The simplest way to keep track of cancelled status is to nullify the # callback. This should also be optimal for garbage collection. @callback = nil end
def cancelled?
def cancelled? @callback.nil? end
def fire(time)
def fire(time) @callback.call(time) if @callback end
def initialize(time, callback)
def initialize(time, callback) @time = time @callback = callback end