class_docstr: Timer used to schedule events in the future or on a repeating schedule.
  
  Parameters
  ----------
  interval : float | 'auto'
      Time between events in seconds. The default is 'auto', which
      attempts to find the interval that matches the refresh rate of
      the current monitor. Currently this is simply 1/60.
  connect : function | None
      The function to call.
  iterations : int
      Number of iterations. Can be -1 for infinite.
  start : bool
      Whether to start the timer.
  app : instance of vispy.app.Application
      The application to attach the timer to.
class_docstr_tok: ["Timer","used","to","schedule","events","in","the","future","or","on","a","repeating","schedule",".","Parameters","--","--","--","--","--","interval",":","float","|","'auto'","Time","between","events","in","seconds",".","The","default","is","'auto","'",",","which","attempts","to","find","the","interval","that","matches","the","refresh","rate","of","the","current","monitor",".","Currently","this","is","simply","1\/60",".","connect",":","function","|","None","The","function","to","call",".","iterations",":","int","Number","of","iterations",".","Can","be","-1","for","infinite",".","start",":","bool","Whether","to","start","the","timer",".","app",":","instance","of","vispy.app.Application","The","application","to","attach","the","timer","to","."]
docstr: Initiallize timer method.
docstr_tok: ["Initiallize","timer","method","."]
code: def __init__(
      self,
      interval="auto",
      connect=None,
      iterations=-1,
      start=False,
      app=None,
  ):
      """Initiallize timer method."""
      self.events = EmitterGroup(
          source=self, start=Event, stop=Event, timeout=Event
      )
      # self.connect = self.events.timeout.connect
      # self.disconnect = self.events.timeout.disconnect
  
      # Get app instance
      if app is None:
          self._app = use_app(call_reuse=False)
      elif isinstance(app, Application):
          self._app = app
      elif isinstance(app, str):
          self._app = Application(app)
      else:
          raise ValueError("Invalid value for app %r" % app)
  
      # Ensure app has backend app object
      self._app.native
  
      # Instantiate the backed with the right class
      self._backend = self._app.backend_module.TimerBackend(self)
  
      if interval == "auto":
          interval = 1.0 / 60
      self._interval = float(interval)
      self._running = False
      self._first_emit_time = None
      self._last_emit_time = None
      self.iter_count = 0
      self.max_iterations = iterations
      if connect is not None:
          self.connect(connect)
      if start:
          self.start()
  
file_path: vispy/vispy/app/timer.py
imports: from __future__ import division
  from ..util.event import Event, EmitterGroup
  from ..util.ptime import time
  from .base import BaseTimerBackend
  from .None import use_app, Application
label_desc: Use image node_id 1 to create a new Timer object from inherited base classes: object with example: obj = Timer(interval, connect, iterations, start, app)