lib/polling.rb in polling-0.0.2 vs lib/polling.rb in polling-0.0.3

- old
+ new

@@ -5,15 +5,15 @@ module Polling module_function def run(arr, debug=false) start = true - + arr = Confirm::check_arr(arr) loop do arr.each do |time| time = Confirm::check_value(time) - Sleep::exec Target::create_time(0, debug) if start - Sleep::exec Target::create_time(time, debug) unless start + Sleep::exec Target::interval(0, debug) if start + Sleep::exec Target::interval(time, debug) unless start start = false yield end end end