instiki/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb
Jacques Distler 5292899c9a Rails 2.1 RC1
Updated Instiki to Rails 2.1 RC1 (aka 2.0.991).
2008-05-17 23:22:34 -05:00

13 lines
160 B
Ruby

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