'Signals for the metronome to stop.
Args:
stop_time: The float wall time in seconds after which the metronome should
stop. By default, stops at next tick.
block: If true, blocks until thread terminates.'

def stop(self, stop_time=0, block=True):

    self._stop_time = stop_time
    if block:
        self.join()
