lib/clockwork/event.rb in clockwork-1.0.2 vs lib/clockwork/event.rb in clockwork-1.1.0
- old
+ new
@@ -56,10 +56,10 @@
@manager.log_error e
@manager.handle_error e
end
def elapsed_ready(t)
- @last.nil? || (t - @last).to_i >= @period
+ @last.nil? || (t - @last.to_i).to_i >= @period
end
def validate_if_option(if_option)
if if_option && !if_option.respond_to?(:call)
raise ArgumentError.new(':if expects a callable object, but #{if_option} does not respond to call')