summaryrefslogtreecommitdiff
path: root/man/sd_bus_get_fd.xml
diff options
context:
space:
mode:
authorUrs Ritzmann <ursritzmann@protonmail.ch>2021-12-03 15:47:18 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-12-06 11:21:48 +0100
commit25060a570c106cf5a14a3268bb0d38d9feb7fdab (patch)
tree68fe5ff30dff2dfcd85118166eef6a49dc383a6e /man/sd_bus_get_fd.xml
parent79fa910333bbe4c16734821d8ad6b976f5af6017 (diff)
downloadsystemd-25060a570c106cf5a14a3268bb0d38d9feb7fdab.tar.gz
sd_bus_get_timeout: fix timeout value doc
The documentation of sd_bus_get_timeout wrongfully states that the returned time-value is relative. In fact, it is an absolute value which is based of CLOCK_MONOTONIC. This change corrects that documentation.
Diffstat (limited to 'man/sd_bus_get_fd.xml')
-rw-r--r--man/sd_bus_get_fd.xml7
1 files changed, 4 insertions, 3 deletions
diff --git a/man/sd_bus_get_fd.xml b/man/sd_bus_get_fd.xml
index 2c0ec8fc05..a8a1615990 100644
--- a/man/sd_bus_get_fd.xml
+++ b/man/sd_bus_get_fd.xml
@@ -74,9 +74,10 @@
without any applied timeout. Note that the returned timeout should be considered only a
maximum sleeping time. It is permissible (and even expected) that shorter timeouts are used by
the calling program, in case other event sources are polled in the same event loop. Note that
- the returned time-value is relative and specified in microseconds. When converting this value in
- order to pass it as third argument to <function>poll()</function> (which expects milliseconds),
- care should be taken to use a division that rounds up to ensure the I/O polling operation
+ the returned time-value is absolute, based of <constant>CLOCK_MONOTONIC</constant> and specified
+ in microseconds. When converting this value in order to pass it as third argument to
+ <function>poll()</function> (which expects relative milliseconds), care should be taken to convert
+ to a relative time and use a division that rounds up to ensure the I/O polling operation
doesn't sleep for shorter than necessary, which might result in unintended busy looping
(alternatively, use
<citerefentry project='man-pages'><refentrytitle>ppoll</refentrytitle><manvolnum>2</manvolnum></citerefentry>