class_docstr: A running stat for conveniently logging the duration of a code block.
  
  Example:
      wait_timer = TimerStat()
      with wait_timer:
          ray.wait(...)
  
  Note that this class is *not* thread-safe.
class_docstr_tok: ["A","running","stat","for","conveniently","logging","the","duration","of","a","code","block",".","Example",":","wait_timer","=","TimerStat","(",")","with","wait_timer",":","ray.wait","(","...",")","Note","that","this","class","is","*","not","*","thread-safe","."]
code: def mean_units_processed(self):
      if len(self._units_processed) == 0:
          return 0.0
      return float(sum(self._units_processed)) / len(
          self._units_processed
      )
  
file_path: ray/python/ray/util/timer.py
imports: import time
label_desc: Use image node_id 8 for calling the _Timer obj's underlying member method code with example usage: obj.mean_units_processed() and returns: unknown, int