workaround for time(2) being non-monotonic
Apparently, time(2) may go backwards in the first 1 - 2.5ms of
every second since Linux + glibc 2.31+ (and some proprietary
OSes). Use clock_gettime(2) with CLOCK_REALTIME to workaround
the problem at the cost of a slight performance hit(*). While git
will likely use gettimeofday(2) for compatibility with
proprietary OSes, gettimeofday(2) was declared obsolete in
POSIX.1-2008 and we don't support proprietary OSes.
(*) https://inbox.sourceware.org/libc-alpha/87ttywq0je.fsf@oldenburg.str.redhat.com/
Link: https://lore.kernel.org/git/20230319064353.686226-3-eggert@cs.ucla.edu/T/