4 ms·
Actually, this sort-of describes "smeared UTC", which is used by some computer systems such as Google's NTP servers: https://developers.google.com/time/smear ht
by bloppe 2y ago
Actually, this sort-of describes "smeared UTC", which is used by some computer systems such as Google's NTP servers: https://developers.google.com/time/smear https://developers.google.com/time/smear
POSIX time does not generally work that way. It may seem that way for 1-second resolution timestamps, but at higher resolutions (say millisecond resolution), the clock does not completely stop. It keeps going, jumps backward 1 second, then continues.
- amiga386 2y agoI think you're talking about struct timespec, I'm talking about time_t. I don't think "POSIX time" specifies behavior during leap-seconds for the functions that return timespecs (gettimeofday() [0] and clock_gettime(CLOCK_REALTIME) [1]), so any behaviour would be valid - including smearing or repeating nanoseconds? [0] https://pubs.opengroup.org/onlinepubs/9699919799/functions/gettimeofday.html https://pubs.opengroup.org/onlinepubs/9699919799/functions/g... [1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_gettime.html https://pubs.opengroup.org/onlinepubs/9699919799/functions/c...