class Quartz::EventSet
- Quartz::EventSet
- Reference
- Object
Overview
EventSet
represents the pending event set and encompasses all future
events scheduled to occur.
Defined in:
quartz/event_set.crConstructors
- .new(time : TimePoint = TimePoint.new(0)) : self
- .new(priority_queue : Symbol, current_time : TimePoint = TimePoint.new(0))
Instance Method Summary
-
#advance : TimePoint
Advance the current time up to the next planned event.
-
#advance(until t : TimePoint) : TimePoint
Advance the current time until it reaches the given time point.
-
#advance(by duration : Duration) : TimePoint
Advance the current time up to the specified planned duration using a multiscale time advancement.
-
#cancel_event(event : Schedulable) : Schedulable?
Cancel the specified event.
-
#clear
Clears
self
. -
#current_time : TimePoint
Returns the current time associated with the event set.
-
#current_time=(current_time : TimePoint)
Returns the current time associated with the event set.
-
#duration_of(event : Schedulable) : Duration
Returns the planned duration after which the specified event will occur.
-
#each_imminent_event(&)
Deletes and yields each imminent simultaneous event.
-
#empty? : Bool
Whether the event set is empty.
-
#imminent_duration : Duration
Returns the planned
Duration
associated with the future imminent events to occur, orDuration::INFINIY
ifself
is empty. - #inspect(io)
-
#plan_event(event : Schedulable, duration : Duration)
Schedules a future event at a given planned duration.
-
#pop_imminent_event : Schedulable
Deletes and returns the next imminent event to occur.
-
#pop_imminent_events : Array(Schedulable)
Deletes and returns all imminent simultaneous events.
- #priority_queue : Quartz::PriorityQueue(Schedulable)
-
#size
Returns the number of scheduled events.
Instance methods inherited from class Reference
==(other : Quartz::Any)
==
Instance methods inherited from class Object
===(other : Quartz::Any)
===
Constructor Detail
Instance Method Detail
Advance the current time until it reaches the given time point.
Advance the current time up to the specified planned duration using a multiscale time advancement.
Raises if the current time advances beyond the imminent events.
Returns the current time associated with the event set.
Returns the current time associated with the event set.
Returns the planned duration after which the specified event will occur.
Returns the planned Duration
associated with the future imminent events
to occur, or Duration::INFINIY
if self
is empty.
Schedules a future event at a given planned duration.
Deletes and returns all imminent simultaneous events.