aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/benchmark.rb
blob: 98e61e646ab00d2836fae527c0772be7b9d677c3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
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