clock_gettime(CLOCK_REALTIME, &ts) is equivalent to timespec_get(&ts,
TIME_UTC) in C11.
It has the advantage that avoids the following building error when building
with macOS:
warning: 'timespec_get' is only available on macOS 10.15 or newer
[-Wunguarded-availability-new]