clock()

This is the standard C library clock function from time.h.

Show/hideSyntax

clock_t clock(void);

Show/hideUsage

The default implementation of this function uses semihosting.

If the units of clock_t differ from the default of centiseconds, you must define __CLK_TCK on the compiler command line or in your own header file. The value in the definition is used for CLK_TCK and CLOCKS_PER_SEC. The default value is 100 for centiseconds.

Note

If you re-implement clock() you must also re-implement _clock_init().

Show/hideReturns

The returned value is an unsigned integer.

Show/hideSee also

Reference

ARM C and C++ Libraries and Floating-Point Support User Guide:

Copyright © 2014 ARM. All rights reserved.ARM DUI 0809B
Non-ConfidentialID121814