Re: What is a typical precision of gettimeofday()? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: What is a typical precision of gettimeofday()?
Date
Msg-id 9e7b21e7-4c63-4299-87f4-780a0699a7d8@eisentraut.org
Whole thread Raw
In response to Re: What is a typical precision of gettimeofday()?  ("Andrey M. Borodin" <x4mmm@yandex-team.ru>)
Responses Re: What is a typical precision of gettimeofday()?
List pgsql-hackers
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.




pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Better error message when --single is not the first arg to postgres executable
Next
From: Tomas Vondra
Date:
Subject: Re: suspicious valgrind reports about radixtree/tidstore on arm64