Skip to content

Show time in real milli seconds

Peter W. Draper requested to merge time-in-seconds into master

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.

Merge request reports