This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Question] CLOCKS_PER_SEC value


On 8/22/2011 11:34 AM, Joon Hee Lee wrote:
Dear all,

POSIX standard defines CLOCKS_PER_SEC value is 1000000.
However, the current value in newlib for ARM and THUMB, is 100.
I couldn't understand the reason to define CLOCKS_PER_SEC as 100.
Could you let me know about the reason and wouldn't it be better to go
with the POSIX value?


I don't think it's our business to change a decision presumably made by the platform implementor. However, I'll point out that the actual resolution on a vast majority of existing machines is no better than 100 CLOCKS_PER_SECOND, and it's probably more difficult to deal with that on platforms which don't support support a physical int_64 or good double support, as we're wasting a lot of bits with the posix definition.



-- Tim Prince


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]