Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
class method
Benchmark::Tms.new
() -> ::Benchmark::Tms
new(utime = 0.0, stime = 0.0, cutime = 0.0, cstime = 0.0, real = 0.0, label = nil)
lib/benchmark.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/benchmark.rb, line 442
def initialize(utime = 0.0, stime = 0.0, cutime = 0.0, cstime = 0.0, real = 0.0, label = nil)
@utime, @stime, @cutime, @cstime, @real, @label = utime, stime, cutime, cstime, real, label.to_s
@total = @utime + @stime + @cutime + @cstime
end
Returns an initialized Tms object which has utime as the user CPU time, stime as the system CPU time, cutime as the children’s user CPU time, cstime as the children’s system CPU time, real as the elapsed real time and label as the label.