def realtime_store(hash, key)
      ret = nil
      r0 = Time.now
      begin
        ret = yield
      ensure
        r1 = Time.now
        hash[key] = (hash[key] || 0) + (r1.to_f - r0.to_f)
      end
      ret
    end
def realtime_store(hash, key)
      ret = nil
      r0 = Time.now
      begin
        ret = yield
      ensure
        r1 = Time.now
        hash[key] = (hash[key] || 0) + (r1.to_f - r0.to_f)
      end
      ret
    end
Stores the elapsed real time used to execute the given block in the given
 hash for the given key and returns the result from the block.  If the hash
 already has a value for that key, the time is accumulated.

   timings = {}

   Benchmark.realtime_store(timings, :sleep) { sleep 2; "foo" } # => "foo"
   timings # => {:sleep => 2.00}

   Benchmark.realtime_store(timings, :sleep) { sleep 2; "bar" } # => "bar"
   timings # => {:sleep => 4.00}