Defined in rt_misc.h, the
_clock_init() function is an initialization function for
It is not part of the C library standard, but the ARM® C library supports it as an extension.
This is a function that you can re-implement in an implementation-specific way. It is called from the library initialization code, so you do not have to call it from your application code.
NoteYou must re-implement this function if you re-implement
The initialization that
clock() to return the time that has
elapsed since the program was started.
An example of how you might re-implement
be to set the timer to zero. However, if your implementation of
on a system timer that cannot be reset, then
instead read the time at startup (when called from the library initialization code),
clock() subsequently subtracting the time
that was read at initialization, from the current value of the timer.
In both cases, some form of initialization is required of