= private = protected
measure(label = "")
Returns the time used to execute the given block as a Benchmark::Tms object.
# File lib/benchmark.rb, line 291 def measure(label = "") # :yield: t0, r0 = Benchmark.times, Time.now yield t1, r1 = Benchmark.times, Time.now Benchmark::Tms.new(t1.utime - t0.utime, t1.stime - t0.stime, t1.cutime - t0.cutime, t1.cstime - t0.cstime, r1.to_f - r0.to_f, label) end