instiki/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb

13 lines
160 B
Ruby
Raw Normal View History

require 'benchmark'
class << Benchmark
remove_method :realtime
def realtime
r0 = Time.now
yield
r1 = Time.now
r1.to_f - r0.to_f
end
end