You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/04/11 21:56:25 UTC

[GitHub] [incubator-nuttx] btashton edited a comment on issue #3516: clock() and CLOCKS_PER_SEC is not POSIX compliant

btashton edited a comment on issue #3516:
URL: https://github.com/apache/incubator-nuttx/issues/3516#issuecomment-817378907


   My reading of the opengroup page is that it is OK if `CLOCKS_PER_SEC` is not 1M, as it is suppose to be the definition of C N1256 standard (which has no requirement for this), it just usually is 1M.  What is important is that `clock()` / `CLOCKS_PER_SEC` is gives to process duration. Because we are using `clock_systime_ticks` this is not correct. 
   
   My understanding is that we should to make clock() return the process ticks.  It would be _nice_ if we made CLOCKS_PER_SEC be 1M, but it would be ideal to just hide this in the clock() interfaces and use a real CLOCKS_PER_SEC in the OS internals.  This second bit I don't think is technically required.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org