STINNER Victor <vstin...@python.org> added the comment:

I suggest to remove the (now <= 0) check.

        _PyTime_t now = _PyTime_GetPerfCounter();
        if (now <= 0) {
            Py_FatalError("_PyTime_GetPerfCounter() == 0");
        }

Please don't add such Py_FatalError() in the middle of a function. If this case 
happens, it means that Python immediately exits and creates a debug report (ex: 
coredump on Unix, popup on Windows asking to open a debugger), and worse: it 
exits the process immediately.

I'm not aware of anyone reporting that _PyTime_GetPerfCounter() returns 0. Do 
you fear that the clock is broken and *always* report 0? If yes, please add at 
check when Python starts. But why do you think that it could happen?

----------
nosy: +vstinner

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41299>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to