'Given a counter set, return the timestamp of a named instance.'

def _find_performance_counter_timestamp(self, counters, counter_name, instance_name=None):

    for counter in counters:
        if (counter_name in counter):
            if ((instance_name is None) or (counter['instance-name'] == instance_name)):
                return counter['timestamp']
    else:
        raise exception.NotFound((_('Counter    %s    not    found') % counter_name))
