[PATCH] Let RTEMS provide clock()
Joel Sherrill
joel.sherrill@oarcorp.com
Wed Sep 6 14:30:00 GMT 2017
On 9/6/2017 3:53 AM, Sebastian Huber wrote:
> On 06/09/17 10:41, Corinna Vinschen wrote:
>
>> I just don't quite understand. Is sysconf(_SC_CLK_TCK) different
>> from CLOCKS_PER_SEC on RTEMS?
>
> Yes, the CLOCKS_PER_SEC is a POSIX defined constant and the
> sysconf(_SC_CLK_TCK) returns the actual system tick frequency. Which is
> usually 100 or 1000 ticks per second.
>
Making it more complicated, the system tick frequency is
something that the end user can set for each application.
We just need to make sure that the constant CLOCKS_PER_SECOND
is appropriate for use with clock() as defined here:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/clock.html
Sebastian.. I assume that all that matches up per POSIX, right?
--joel
More information about the Newlib
mailing list