未验证 提交 5371d5dc 编写于 作者: J John Hawthorn 提交者: GitHub

Merge pull request #38230 from jhawthorn/benchmark_ms_block

Pass Benchmark.ms block through to realtime
......@@ -10,7 +10,7 @@ class << Benchmark
#
# Benchmark.ms { User.all }
# # => 0.074
def ms
1000 * realtime { yield }
def ms(&block)
1000 * realtime(&block)
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册