<div dir="ltr"><p>Okay, you mean DBus uses user's callbacks like a platform specific API for creating a platform specific timer (QTimer, linux timer and etc.) and DBus deals only with abstract number that in fact is timeout in milliseconds.</p><p>In this case I need only create Timer, check when this timer expired and then make dbus_timeout_handle() to say DBus that Timer has expired, am I right ?<br></p><p>And should I restart timer after it expired and start again or I should remove this timer from list ?</p><p><br></p><p>But in this case when DBus request to add watcher for me it seems like workaround, because with DBus know how to work with this platform specific file descriptor, but anyway it asks us to say when it will be handled (for me it seems strange).</p><p><br></p><div class="gmail_extra"><div class="gmail_quote">On Dec 27, 2016 02:35, "Thiago Macieira" <<a href="mailto:thiago@kde.org" target="_blank">thiago@kde.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Em segunda-feira, 26 de dezembro de 2016 16:54:38 BRST você escreveu:<br>
> Hi Thiago,<br>
><br>
> Thanks for explanation.<br>
><br>
> I little bit figure out how to work with Watchs from this link<br>
> <a href="https://lists.freedesktop.org/archives/dbus/2007-October/008859.html" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>archives/dbus/2007-October/008<wbr>859.html</a> .<br>
> But I have not still understood how to work with timeout. This timeout<br>
> (add_timeout and remove_timeout) what are their purposes ? It is timeout<br>
> that given by libdbus to handle events for specific file descriptor or what<br>
> is it ?<br>
<br>
The purpose is for you to tell libdbus when enough time has passed. They are<br>
not connected to a specific file descriptor, only the clock.<br>
<br>
--<br>
Thiago Macieira - thiago (AT) <a href="http://macieira.info" rel="noreferrer" target="_blank">macieira.info</a> - thiago (AT) <a href="http://kde.org" rel="noreferrer" target="_blank">kde.org</a><br>
Software Architect - Intel Open Source Technology Center<br>
</blockquote></div></div>
</div>