[PATCH] use montonic clock instead of gettimeofday

Thiago Macieira thiago at kde.org
Thu Dec 10 15:05:31 PST 2009


Em Quinta-feira 10. Dezembro 2009, às 18.27.23, Tom Hughes escreveu:
> Greetings,
> 
> Attached is a patch to use the monotonic clock instead of
> gettimeofday() in _dbus_get_current_time(), which prevents issues when
> _dbus_get_current_time() is used to calculate timeouts and the system
> time changes (e.g., in _dbus_connection_block_pending_call()).
> 
> It also contains a patch for pthread_cond_timedwait to use the
> monotonic clock, but this appears to have already been fixed, so you
> can ignore that part of the patch.
> 
> It's based off dbus version 1.1.20, but should apply to top of trunk.

Thanks Tom, patch looks good.

Can you add it to bugzilla so we don't lose track of it? Please submit it as 
the output of git format-patch, so we can credit you properly with the change.

PS: my autoconf/automake are very rusty, but don't you need to get the library 
to link to librt?

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/dbus/attachments/20091211/87d6874a/attachment.pgp 


More information about the dbus mailing list