def __init__(self, interval):
        super(Timer, self).__init__()
        self._interval = interval

        now = time()
        rem = now % interval
        self._time = int(now - rem)
        QtCore.QTimer.singleShot((self._interval - rem) * 1000, self._tick)