logs a event in the timer

def log(self, timer_name, node):
        ''' logs a event in the timer '''
        timestamp = time.time()
        if hasattr(self, timer_name):
            getattr(self, timer_name).append({
                "node":node,
                "time":timestamp})
        else:
            setattr(self, timer_name, [{"node":node, "time":timestamp}])