Improving Float.random(in:using:)

Possible alternatives to mach_absolute_time():

  • clock_gettime_nsec_np(CLOCK_UPTIME_RAW) — a non-portable Darwin extension in <time.h>

  • DispatchTime.now().uptimeNanoseconds

  • ProcessInfo.processInfo.systemUptime — except the implementation for Windows uses a lower-resolution clock?