lib/guard/listeners/polling.rb
def watch_change
      until @stop
        start = Time.now.to_f
        files = modified_files([@directory], :all => true)
        @callback.call(files) unless files.empty?
        nap_time = @latency - (Time.now.to_f - start)
        sleep(nap_time) if nap_time > 0
      end
    end
# Watch for file system changes.
#
Watch for file system changes.
Watch for file system changes .
def watch_change
      until @stop
        start = Time.now.to_f
        files = modified_files([@directory], :all => true)
        @callback.call(files) unless files.empty?
        nap_time = @latency - (Time.now.to_f - start)
        sleep(nap_time) if nap_time > 0
      end
    end
def watch_change until @stop start = Time . now . to_f files = modified_files ( [ @directory ] , :all => true ) @callback . call ( files ) unless files . empty? nap_time = @latency - ( Time . now . to_f - start ) sleep ( nap_time ) if nap_time > 0 end end
Watch for file system changes.
Watch for file system changes .