'Register resource usage for a given status.'

def AddResourceUsage(self, status):

    if (self.user_cpu_usage or self.system_cpu_usage):
        status.cpu_time_used = rdf_client.CpuSeconds(user_cpu_time=self.user_cpu_usage.next(), system_cpu_time=self.system_cpu_usage.next())
    if self.network_usage:
        status.network_bytes_sent = self.network_usage.next()
