The test randomly fails for unrelated PRs. Expecting real-time timing on
native is not really possible. Maybe it could be fixed but it currently
triggers many false positive.
- adapt code to use public, typesafe API calls
- add some statistical output
- minor code enhancements and doc corrections
- use fmt print_str for uint64_t