

@wrap_exceptions
def get_cpu_times(self):
    f = open(('/proc/%s/stat' % self.pid))
    try:
        st = f.read().strip()
    finally:
        f.close()
    st = st[(st.find(')') + 2):]
    values = st.split(' ')
    utime = (float(values[11]) / _CLOCK_TICKS)
    stime = (float(values[12]) / _CLOCK_TICKS)
    return nt_cputimes(utime, stime)

dataset/ETHPy150Open packages/psutil/psutil/_pslinux.py Process.get_cpu_times/original