def _cpu_busy_time(times):
 busy = _cpu_tot_time(times)
 busy -= times.idle
 busy -= getattr(times, 'iowait', 0)
 return busy

def _cpu_busy_time ( times ) : busy = _cpu_tot_time ( times ) busy -= times . idle busy -= getattr ( times , 'iowait' , 0 ) return busy
given a cpu_time() ntuple calculates the busy cpu time .