提交 95af4686 编写于 作者: M Michael Koziarski

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


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8771 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 6d39d052
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
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册