aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/benchmark.rb
blob: 79ba165e3a5ffd7500ab5d9655d80abdf54a4e2b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
require 'benchmark'

class << Benchmark
  remove_method :realtime

  def realtime
    r0 = Time.now
    yield
    r1 = Time.now
    r1.to_f - r0.to_f
  end
end