lib/rake/funnel/support/timing/statistics.rb in rake-funnel-0.3.2.pre vs lib/rake/funnel/support/timing/statistics.rb in rake-funnel-0.4.0.pre
- old
+ new
@@ -1,26 +1,32 @@
-module Rake::Funnel::Support::Timing
- class Statistics
- include Enumerable
-
- attr_reader :started_at
-
- def initialize
- @stats = []
- @started_at = Time.now
- end
-
- def each(&block)
- @stats.each(&block)
- end
-
- def benchmark(task)
- t0 = Time.now
- begin
- yield if block_given?
- ensure
- t1 = Time.now
- @stats << { task: task, time: t1 - t0 }
- end
- end
- end
-end
+module Rake
+ module Funnel
+ module Support
+ module Timing
+ class Statistics
+ include Enumerable
+
+ attr_reader :started_at
+
+ def initialize
+ @stats = []
+ @started_at = Time.now
+ end
+
+ def each(&block)
+ @stats.each(&block)
+ end
+
+ def benchmark(task)
+ t0 = Time.now
+ begin
+ yield if block_given?
+ ensure
+ t1 = Time.now
+ @stats << { task: task, time: t1 - t0 }
+ end
+ end
+ end
+ end
+ end
+ end
+end