def timerproc(self):
        while True:
            self._lock.acquire()

            while True:
                if not len(self._heap):
                    delta = -1
                    break

                t = heapq.heappop(self._heap)
                now = nanotime()
                delta = now - t.when
                if delta > 0:
                    heapq.heappush(self._heap, t)
                    break
                else:
                    # repeat ? reinsert the timer
                    if t.period is not None and t.period > 0:
                        np = nanotime(t.period)
                        t.when += np * (1 - delta/np)
                        heapq.heappush(self._heap, t)

                    # run
                    self._lock.release()
                    t.callback(now, t, *t.args, **t.kwargs)
                    self._lock.acquire()


            if delta < 0:
                self.sleeping = True
                self._lock.release()
                schedule_remove()
            else:
                self._lock.release()
                schedule()
dataset/ETHPy150Open benoitc/flower/flower/core/timer.py/Timers.timerproc/swapped operands of `-`