Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

Process.times

Process.times → aProcessTms

Returns a Tms structure (see Process::Tms) that contains user and system CPU times for this process, and also for children processes.

Example
t = Process.times
[ t.utime, t.stime, t.cutime, t.cstime ]   #=> [0.0, 0.02, 0.00, 0.00]
See also .spawn .uid .setsid .uid= also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0