code: def toc(quiet=False):
      r
      if '_startTime_for_tictoc' in globals():
          t = _time.time() - _startTime_for_tictoc
          if quiet is False:
              print('Elapsed time in seconds: ', t)
          else:
              return t
      else:
          raise Exception('Start time not set, call tic first')
docs: r"""
      Homemade version of matlab tic and toc function, tic starts or resets
      the clock, toc reports the time since the last call of tic.
  
      Parameters
      ----------
      quiet : Boolean
          If False (default) then a message is output to the console.  If True
          the message is not displayed and the elapsed time is returned.
  
      See Also
      --------
      tic