在 2021-05-03 00:39, Dan Raymond 写道:
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 youare interested in the relative
difference between two consecutive wall clock times then high precisionis 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.
Yes, you are right, and should one prefer `system_clock`, `steady_clock` or `high_resolution_clock` under such circumstances? Why not call `GetSystemTimePreciseAsFileTime()` directly?
-- Best regards, Liu Hao
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public