Method: Benchmark::Tms#initialize
- Defined in:
- lib/benchmark.rb
#initialize(u = 0.0, s = 0.0, cu = 0.0, cs = 0.0, real = 0.0, l = nil) ⇒ Tms
Returns an initialized Tms object which has u as the user CPU time, s as the system CPU time, cu as the children’s user CPU time, cs as the children’s system CPU time, real as the elapsed real time and l as the label.
426 427 428 429 |
# File 'lib/benchmark.rb', line 426 def initialize(u = 0.0, s = 0.0, cu = 0.0, cs = 0.0, real = 0.0, l = nil) @utime, @stime, @cutime, @cstime, @real, @label = u, s, cu, cs, real, l @total = @utime + @stime + @cutime + @cstime end |