class

Quartz::TimeCache

Inherits Reference / Object

The TimeCache data structure is used to store and retrieve elapsed durations since a particular event.

Constructors

new(current_time : TimePoint = TimePoint.new(0))
Source

Instance methods

advance(by duration : Duration) : TimePoint

Advance the current time by the given Duration relative to the current time.

Source
advance(until time_point : TimePoint) : TimePoint

Advance the current time until match the given TimePoint.

Source
current_time

Returns the current time associated with the time cache.

Source
current_time=(current_time : TimePoint)

Returns the current time associated with the time cache.

Source
elapsed_duration_of(event : Schedulable) : Duration

Returns the elapsed Duration associated with the given event since the previous event.

Source
release_event(event : Schedulable)

Cancel the tracking of the elapsed duration since the previous event of the given event.

Source
retain_event(event : Schedulable, precision : Scale)

Retain the given event in order to track the elapsed duration since the #current_time as time advances.

Source
retain_event(event : Schedulable, elapsed : Duration)

Retain the given event with a given elapsed duration since the #current_time, in order to track it as time advances.

Source