Class: EventMachine::Timer

Inherits:
Object
  • Object
show all
Defined in:
lib/eventmachine.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args, &block) ⇒ Timer

Returns a new instance of Timer.



1137
1138
1139
# File 'lib/eventmachine.rb', line 1137

def initialize *args, &block
	@signature = EventMachine::add_timer(*args, &block)
end

Instance Method Details

#cancelObject



1140
1141
1142
# File 'lib/eventmachine.rb', line 1140

def cancel
	EventMachine.send :cancel_timer, @signature
end