examples/primes/lib/primes/kernel_extensions.rb in royw-drbman-0.0.2 vs examples/primes/lib/primes/kernel_extensions.rb in royw-drbman-0.0.3
- old
+ new
@@ -1,5 +1,8 @@
module Kernel
+ # adds a elapse time method
+ # @yield the block to find the execution elapsed time of
+ # @return [Float] the number of seconds the block took to execute
def elapse(&block)
seconds = 0
unless block.nil?
start_time = Time.now
block.call