[PATCH v2 05/10] Use clock_gettime to implement time.

Paul Eggert eggert@cs.ucla.edu
Wed Aug 28 20:01:00 GMT 2019


Florian Weimer wrote:
> Given that time has no stringent accuracy requirements, this shouldn't
> come as a surprise.

In what sense does 'time' have less-stringent accuracy requirements than 
clock_gettime (CLOCK_REALTIME) does? Can 'time' return a value that disagrees 
with the time_t part of what clock_gettime (CLOCK_REALTIME) returns? Any such 
disagreement would cause application bugs that could well be unlikely and hard 
to track down; also, if there is disagreement, replacing calls to 'time' with 
calls to clock_gettime might not be advisable even aside from performance issues.



More information about the Libc-alpha mailing list