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

From Tom Lane
Subject Re: What is a typical precision of gettimeofday()?
Date
Msg-id 900154.1752002988@sss.pgh.pa.us
Whole thread Raw
In response to Re: What is a typical precision of gettimeofday()?  (Andrey Borodin <x4mmm@yandex-team.ru>)
List pgsql-hackers
Andrey Borodin <x4mmm@yandex-team.ru> writes:
>> On 8 Jul 2025, at 23:07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> The fact that the clock tick is about 40ns is extremely
>> obvious in this presentation.

> FWIW while working on UUID v7 Masahiko found that if we try to read real time with clock_gettime(CLOCK_REALTIME,)
measurementis truncated to microseconds. 

Yeah.  Bear in mind that instr_time.h uses CLOCK_MONOTONIC_RAW on
macOS, so that's what we're looking at here.

            regards, tom lane



pgsql-hackers by date:

Previous
From: "Zhou, Zhiguo"
Date:
Subject: [RFC] Enhance scalability of TPCC performance on HCC (high-core-count) systems
Next
From: Álvaro Herrera
Date:
Subject: Re: Support for 8-byte TOAST values (aka the TOAST infinite loop problem)