def get_system_cpu_times(): """Return a dict representing the following CPU times: user, nice, system, idle, interrupt.""" values = _psutil_bsd.get_system_cpu_times() return dict(user=values[0], nice=values[1], system=values[2], idle=values[3], irq=values[4])
def get_system_cpu_times(): """Return system per-CPU times as a named tuple""" user, nice, system, idle, irq = _psutil_bsd.get_system_cpu_times() return _cputimes_ntuple(user, nice, system, idle, irq)