On 18.06.24 07:47, Andrey M. Borodin wrote:
>
>
>> On 19 Mar 2024, at 13:28, Peter Eisentraut <peter@eisentraut.org> wrote:
>>
>> I feel that we don't actually have any information about this portability concern. Does anyone know what precision
wecan expect from gettimeofday()? Can we expect the full microsecond precision usually?
>
> At PGConf.dev Hannu Krossing draw attention to pg_test_timing module. I’ve tried this module(slightly modified to
measurenanoseconds) on some systems, and everywhere I found ~100ns resolution (95% of ticks fall into 64ns and 128ns
buckets).
AFAICT, pg_test_timing doesn't use gettimeofday(), so this doesn't
really address the original question.