Paul Ganssle <p.gans...@gmail.com> added the comment:

It does seem like the values CLOCKS_PER_SEC, _PyTime_MAX and SEC_TO_NS are all 
defined at compile-time, so presumably this can be a compile-time error.

As currently defined, though, it seems very unlikely that this would ever be 
false, since _PyTime_MAX is the same as LLONG_MAX, which cplusplusreference 
says is `9223372036854775807 (2**63-1) or greater` [0], so CLOCKS_PER_SEC would 
need to be >= 2**50, which is unlikely to be... accurate.

In any case, it seems like this check can happen at compile-time, either 
resulting in compilation failing, or just undefining HAVE_CLOCK.

[0] http://www.cplusplus.com/reference/climits/

----------
nosy: +p-ganssle

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

Reply via email to