lib/picky/helpers/measuring.rb in picky-2.7.0 vs lib/picky/helpers/measuring.rb in picky-3.0.0.pre1

- old
+ new

@@ -1,19 +1,23 @@ -# Helper methods for measuring, benchmarking, logging. -# -module Helpers - module Measuring - - # Returns a duration in seconds. - # - def timed *args, &block - block_to_be_measured = lambda &block - - time_begin = Time.now.to_f - - block_to_be_measured.call *args - - Time.now.to_f - time_begin +module Picky + + # Helper methods for measuring, benchmarking, logging. + # + module Helpers + module Measuring + + # Returns a duration in seconds. + # + def timed *args, &block + block_to_be_measured = lambda &block + + time_begin = Time.now.to_f + + block_to_be_measured.call *args + + Time.now.to_f - time_begin + end + end - end + end \ No newline at end of file