New submission from Tobias Oberstein <[email protected]>: The ftime() function which is declared in <sys/timeb.h> which is only included in rpython/rtyper/module/ll_time.py is deprecated:
http://linux.die.net/man/3/ftime The inclusion of the respective header produces lots of warnings on FreeBSD/Clang and clutters the log. The Linux man page suggests: "This function is obsolete. Don't use it. If the time in seconds suffices, time(2) can be used; gettimeofday(2) gives microseconds; clock_gettime(2) gives nanoseconds but is not as widely available." clock_gettime is available on both Linux and FreeBSD and provides best-resolution time: http://linux.die.net/man/2/clock_gettime http://www.freebsd.org/cgi/man.cgi?query=clock_gettime http://stackoverflow.com/questions/275004/c-timer-function-to-provide-time-in-nano-seconds/275231#275231 However, it's not there on OSX: http://stackoverflow.com/questions/5167269/clock-gettime-alternative-in-mac-os-x So we could adjust ll_time.py to use clock_gettime() instead of ftime() on Linux/FreeBSD and do a workaround for OSX. Not sure if that would be acceptable .. ---------- messages: 6350 nosy: oberstet, pypy-issue priority: bug status: unread title: Posix 2001 ftime() is deprecated ________________________________________ PyPy bug tracker <[email protected]> <https://bugs.pypy.org/issue1640> ________________________________________ _______________________________________________ pypy-issue mailing list [email protected] https://mail.python.org/mailman/listinfo/pypy-issue
