[RTEMS Project] #3121: clock() implementation in Newlib is broken
RTEMS trac
trac at rtems.org
Thu Sep 7 05:40:57 UTC 2017
#3121: clock() implementation in Newlib is broken
-----------------------------+------------------------------
Reporter: Sebastian Huber | Owner: joel.sherrill@…
Type: defect | Status: new
Priority: normal | Milestone: Indefinite
Component: Newlib | Version:
Severity: normal | Resolution:
Keywords: |
-----------------------------+------------------------------
Comment (by Sebastian Huber <sebastian.huber@…>):
In [changeset:"bdbf1ffa6e81d75ab3ab7adc11e35b1ee1670c29/rtems"
bdbf1ffa/rtems]:
{{{
#!CommitTicketReference repository="rtems"
revision="bdbf1ffa6e81d75ab3ab7adc11e35b1ee1670c29"
Implement clock()
Newlib uses _times_r() in clock(). The problem is that the _times_r()
clock frequency is defined by sysconf(_SC_CLK_TCK). The clock frequency
of clock() is the constant CLOCKS_PER_SEC.
FreeBSD uses getrusage() for clock(). Since RTEMS has only one process,
the implementation can be simplified.
Update #3121.
}}}
--
Ticket URL: <http://devel.rtems.org/ticket/3121#comment:1>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list