Skip to content

[question] Why not sleep 10 directly?

I notice https://gitlab.com/code-stats/code-stats-vim/-/blob/master/pythonx/codestats.py#L126-129

            cur_time = 0
            while cur_time < INTERVAL:
                time.sleep(SLEEP_INTERVAL)
                cur_time += SLEEP_INTERVAL

Why not directly time.sleep(10)?