class_docstr: Timer.
class_docstr_tok: ["Timer","."]
docstr: Calculate the elapsed time.
docstr_tok: ["Calculate","the","elapsed","time","."]
code: def elapsed(self, reset=True):
      """Calculate the elapsed time."""
      started_ = self.started_
      # If the timing in progress, end it first.
      if self.started_:
          self.stop()
      # Get the elapsed time.
      elapsed_ = self.elapsed_
      # Reset the elapsed time
      if reset:
          self.reset()
      # If timing was in progress, set it back.
      if started_:
          self.start()
      return elapsed_
  
imports: import time
  from .callback import Callback
  from ..log import logger
label_desc: Use image node_id 5 for calling the _Timer obj's underlying member method code with example usage: obj.elapsed(reset) and returns: elapsed_