Class Timers
In: lib/timers/version.rb
lib/timers.rb
Parent: Object

Low precision timers implemented in pure Ruby

Methods

add   after   after_milliseconds   after_ms   every   fire   new   wait   wait_interval  

Included Modules

Enumerable

Classes and Modules

Class Timers::Timer

Constants

VERSION = "1.1.0"

External Aliases

delete -> cancel

Public Class methods

Public Instance methods

Call the given block after the given interval

Call the given block after the given interval has expired. interval is measured in milliseconds.

 Timer.new.after_milliseconds(25) { puts "fired!" }
after_ms(interval, &block)

Alias for after_milliseconds

Call the given block periodically at the given interval

Fire all timers that are ready

Wait for the next timer and fire it

Interval to wait until when the next timer will fire

[Validate]