Thomas Munro <thomas.mu...@gmail.com> writes: > On Thu, Aug 4, 2022 at 4:09 PM Tom Lane <t...@sss.pgh.pa.us> wrote: >> clock_gettime is required by SUSv2 (1997), so I have to admit that >> macOS 10.4 doesn't have a lot of excuse not to have it. In any case, >> prairiedog is just sitting there doing its thing until I find cycles >> to install a newer OS. If you want to move ahead with this, don't >> let prairiedog block you.
> Thanks, will do. BTW, that commit really should have updated the explanation at the top of instr_time.h: * This file provides an abstraction layer to hide portability issues in * interval timing. On Unix we use clock_gettime() if available, else * gettimeofday(). On Windows, gettimeofday() gives a low-precision result * so we must use QueryPerformanceCounter() instead. These macros also give * some breathing room to use other high-precision-timing APIs. Updating the second sentence is easy enough, but as for the third, I wonder if it's still true in view of 24c3ce8f1. Should we revisit whether to use gettimeofday vs. QueryPerformanceCounter? At the very least I suspect it's no longer about "low precision", but about which API is faster. regards, tom lane