class_docstr: A simple timer.
class_docstr_tok: ["A","simple","timer","."]
code: def toc(self, average=True):
      self.diff = time.time() - self.start_time
      self.total_time += self.diff
      self.calls += 1
      self.average_time = self.total_time / self.calls
      if average:
          return self.average_time
      else:
          return self.diff
  
imports: import time
label_desc: Use image node_id 3 for calling the Timer obj's underlying member method code with example usage: obj.toc(average) and returns: self, self