1. `clock_gettime()` is not meant to be precise, and it shouldn't be, because the extra accuracy is useless. (It may make some sense for logging, as mentioned in another message; but in logs only the order of writes matters, while timestamps don't matter.)

I don't agree with this.  First: precision and accuracy are two entirely different things so it's important not to use them interchangeably.  It is true that the absolute value of the wall clock time is not likely to be very accurate.  If you are interested in the absolute value then increasing precision in clock_gettime() is not going to help you.  But if you are interested in the relative difference between two consecutive wall clock times then high precision is useful.  Log timestamps are an excellent example of this.  I probably won't care if event 1 happened at exactly 10:28:16.594.  However I will likely care very much about the precision of the interval between event 1 and event 2.  I don't understand your claim that only the order of writes matters in logs.  If that were true then we wouldn't use timestamps at all.



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to