1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Simplified, faster implementation of Benchmark.realtime [Alexander Dymo]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8771 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Michael Koziarski 2008-02-02 01:53:58 +00:00
parent 6d39d05269
commit 95af46861a

View file

@ -0,0 +1,12 @@
require 'benchmark'
module Benchmark
remove_method :realtime
def realtime
r0 = Time.now
yield
r1 = Time.now
r1.to_f - r0.to_f
end
module_function :realtime
end