Пример #1
0
 def __init__(self, i, o):
     super(StopwatchApp, self).__init__(i, o)
     self.menu_name = "Stopwatch"
     self.counter = Chronometer()
     self.refresher = None
     self.__instructions = [
         "", "UP/ENTER to start/pause", "RIGHT : restart", "DOWN : reset"
     ]
Пример #2
0
 def __init__(self, i, o, *args, **kwargs):
     self._current_angle = 0
     self._current_range = 0  # range or width of the throbber
     self.rotation_speed = 360  # degree per second
     # We use a counter to make the rotation speed independent of the refresh-rate
     self.counter = Chronometer()
     self.start_time = 0
     self.message = kwargs.pop("message", None)
     BaseLoadingIndicator.__init__(self,
                                   i,
                                   o,
                                   refresh_interval=0.01,
                                   *args,
                                   **kwargs)