Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite4da2a4

Browse files
committed
Update obsolete comment about pg_usleep() accuracy.
There are still some systems that use traditional tick-based sleeptiming, but many including Linux, FreeBSD and macOS started using highresolution timer hardware more directly a decade or two ago. Update ourcomment about that. Also highlight that Windows is like the olderUnixen in that respect.Author: Nathan Bossart <nathandbossart@gmail.com>Discussion:https://postgr.es/m/CA%2BhUKG%2BogAon8_V223Ldv6taPR2uKH3X_UJ_A7LJAf3-VRARPA%40mail.gmail.com
1 parent805b821 commite4da2a4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎src/port/pgsleep.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@
2525
/*
2626
* pg_usleep --- delay the specified number of microseconds.
2727
*
28-
* NOTE: although the delay is specified in microseconds, the effective
29-
* resolution is only 1/HZ, or 10 milliseconds, on most Unixen. Expect
30-
* the requested delay to be rounded up to the next resolution boundary.
28+
* NOTE: Although the delay is specified in microseconds, older Unixen and
29+
* Windows use periodic kernel ticks to wake up, which might increase the delay
30+
* time significantly. We've observed delay increases as large as 20
31+
* milliseconds on supported platforms.
3132
*
3233
* On machines where "long" is 32 bits, the maximum delay is ~2000 seconds.
3334
*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp