class_docstr: TimeLimit handler can be used to control training time for computing environments where session time is limited.
  Timer starts when handler is created and not training started.
  This handler gracefully terminates the training if time passed in the training exceeds a limit.
  
  Args:
      limit_sec: Maximum time before training terminates (in seconds). Defaults to 28800.
  
  Examples:
      .. code-block:: python
  
          from ignite.engine import Events
          from ignite.handlers import TimeLimit
  
          handler = TimeLimit() # 8 hours of training
          trainer.add_event_handler(Events.ITERATION_COMPLETED, handler)
  
  .. versionadded:: 0.4.3
code: def __init__(self, limit_sec: Optional[int] = 28800):
      if not isinstance(limit_sec, int):
          raise TypeError("Argument limit_sec should be an integer.")
      if limit_sec <= 0:
          raise ValueError(
              "Argument limit_sec should be a positive integer."
          )
  
      self.limit_sec = limit_sec
      self.start_time = time.time()
      self.logger = setup_logger(
          __name__ + "." + self.__class__.__name__
      )
  
imports: import time
  from typing import Optional
  from ignite.engine import Engine
  from ignite.utils import setup_logger
label_desc: Use image node_id 1 to create a new TimeLimit object  with example: obj = TimeLimit(limit_sec)