def METHOD_NAME(self):
    wait_time = self.interval
    while not self.finished.wait(wait_time):
        start_time = time.time()
        self.function(*self.args, **self.kwargs)
        elapsed_time = time.time() - start_time
        wait_time = max(self.interval - elapsed_time, 0)