buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djspie...@apache.org
Subject svn commit: r917118 - /buildr/trunk/lib/buildr/core/cc.rb
Date Sun, 28 Feb 2010 04:36:40 GMT
Author: djspiewak
Date: Sun Feb 28 04:36:40 2010
New Revision: 917118

URL: http://svn.apache.org/viewvc?rev=917118&view=rev
Log:
Poll frequency should be configurable

Modified:
    buildr/trunk/lib/buildr/core/cc.rb

Modified: buildr/trunk/lib/buildr/core/cc.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/cc.rb?rev=917118&r1=917117&r2=917118&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/cc.rb (original)
+++ buildr/trunk/lib/buildr/core/cc.rb Sun Feb 28 04:36:40 2010
@@ -43,7 +43,7 @@
         trace "Monitoring extensions: [#{ext.join ', '}]"
         
         while true
-          sleep 0.2
+          sleep project.cc.frequency
           
           times, changed = Buildr::CC.check_mtime dirs, ext, times
           unless changed.empty?
@@ -59,6 +59,18 @@
         end
       end
     end
+    
+    def cc
+      @cc ||= CCOptions.new
+    end
+    
+    class CCOptions
+      attr_writer :frequency
+      
+      def frequency
+        @frequency ||= 0.2
+      end
+    end
   end
   
   class Project



Mime
View raw message