class_docstr: A class implementing a simple timer, with a reset option 
class_docstr_tok: ["A","class","implementing","a","simple","timer",",","with","a","reset","option"]
docstr: Enable toc with reset (slightly inaccurate if reset event occurs) 
docstr_tok: ["Enable","toc","with","reset","(","slightly","inaccurate","if","reset","event","occurs",")"]
code: def toc_with_reset(self, average=True, reset_if_calls=1000):
      """Enable toc with reset (slightly inaccurate if reset event occurs)"""
      if self._calls > reset_if_calls:
          last_diff = time.time() - self._start_time
          self._start_time = time.time()
          self._total_time = last_diff
          self._average_time = 0
          self._calls = 0
  
      return self.toc(average=average)
  
imports: import sys
  import time
  import six
label_desc: Use image node_id 8 for calling the Timer obj's underlying member method code with example usage: obj.toc_with_reset(average, reset_if_calls) and returns: self