pg_usleep for multisecond delays - Mailing list pgsql-hackers

From Nathan Bossart
Subject pg_usleep for multisecond delays
Date
Msg-id 20230209205929.GA720594@nathanxps13
Whole thread Raw
Responses Re: pg_usleep for multisecond delays
Re: pg_usleep for multisecond delays
List pgsql-hackers
I just found myself carefully counting the zeros in a call to pg_usleep().
Besides getting my eyes checked, perhaps there should be a wrapper called
pg_ssleep() than can be used for multisecond sleeps.  Or maybe the
USECS_PER_SEC macro should be used more widely.  I attached a patch for the
former approach.  I don't have a strong opinion, but I do think it's worth
improving readability a bit here.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Minor meson gripe
Next
From: Andres Freund
Date:
Subject: Re: Importing pg_bsd_indent into our source tree