Class | EventMachine::PeriodicTimer
In: | lib/em/timers.rb
Parent: | Object

Creates a periodic timer

     n = 0
     timer = EventMachine::PeriodicTimer.new(5) do
       puts "the time is #{Time.now}"
       timer.cancel if (n+=1) > 5
     end

### Methods

cancel new

### Attributes

interval | [RW] | Fire the timer every interval seconds

### Public Class methods

new(interval, callback=nil, &block)

Create a new periodic timer that executes every interval seconds

### Public Instance methods

cancel()

Cancel the periodic timer

[Validate]