Skip to content
Snippets Groups Projects
user avatar
Matthieu Schaller authored
Show time in real milli seconds

The current conversion from `ticks` to milliseconds for display
and comparisons relies on a good value for the `CPU_TPS` macro.

This merge introduces a new `clocks_` API that uses the nano
second clock functions to measure time, so that non-critical
timings can be reported correctly.

It also includes better methods to work out the CPU frequency
so that ticks can also be more reliably converted to seconds.

This works well when the nano second functions are available,
but will fallback to less reliable kernel maximum frequency
values, or just reporting ticks.

The CPU frequency is now reported to the user and can be defined
by them (although this only effects any tick conversions not
time measurements).

The use of CPU_TPS has been stopped and is removed from SWIFT.


See merge request !105
769c0ddd
History