This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients belopolsky, gvanrossum
Date 2008-02-20.18:51:51
SpamBayes Score 0.36682814
Marked as misclassified No
Message-id <1203533514.14.0.265648950996.issue1040026@psf.upfronthosting.co.za>
In-reply-to
Content
On i386 Linux, HZ is #defined as sysconf(_SC_CLK_TCK)

/usr/include/asm-i386/param.h:7:#define HZ sysconf(_SC_CLK_TCK)

so times does the right thing.  On x86_64 HZ is defined as 100, but it 
is the same value as sysconf returns.

I could not find an authoritative statement in this regard, but it 
appears that on modern Linuxes posix_times implementation usin HZ is 
correct.


On the other hand, os.times would be more useful if it just returned a 
tuple of clock ticks.  I suggest implementing os._times returning 
integer clock ticks in posixmodule and reimplementing os.times in os.py 
in terms of sysconf and _times.
History
Date User Action Args
2008-02-20 18:51:54belopolskysetspambayes_score: 0.366828 -> 0.36682814
recipients: + belopolsky, gvanrossum
2008-02-20 18:51:54belopolskysetspambayes_score: 0.366828 -> 0.366828
messageid: <1203533514.14.0.265648950996.issue1040026@psf.upfronthosting.co.za>
2008-02-20 18:51:52belopolskylinkissue1040026 messages
2008-02-20 18:51:52belopolskycreate