lib/polling.rb in polling-0.1.3 vs lib/polling.rb in polling-0.1.4
- old
+ new
@@ -28,11 +28,11 @@
yield if block_given?
end
end
interval = Validate.value interval
- e.__send__(:start_print, e.stime)
+ e.__send__(:start_print, e.stime) if @print_start_time || @debug
case interval
when Array
loop { exec_arr.call interval }
else
@@ -63,10 +63,10 @@
interval = Validate.value interval
if interval.class == Array
raise "Can't input Array class : #{interval}"
end
- e.__send__(:start_print, 0)
+ e.__send__(:start_print, 0) if @print_start_time || @debug
loop { exec.call interval }
rescue => ex
$stderr.puts ex.to_s
end