[PUSHED] Use clock_gettime instead of gettimeofday to have more preci...

Norbert Thiebaud nthiebaud at gmail.com
Wed May 15 02:40:10 PDT 2013


On Wed, May 15, 2013 at 3:07 AM, Stephan Bergmann <sbergman at redhat.com> wrote:
> On 05/13/2013 06:59 PM, Norbert Thiebaud (via Code Review) wrote:
>>
>> Thank you for your patch!  It has been merged to LibreOffice.
>>
>> If you are interested in details, please visit
>>
>>      https://gerrit.libreoffice.org/3841
>
>
> Just saw the hotspot-dev at openjdk.java.net thread "Mac OS X System.nanoTime
> Improvements" starting at
> <http://mail.openjdk.java.net/pipermail/hotspot-dev/2013-May/009496.html>
> that might be interesting for us, too.

yep. I have some code to that effect in my own stuff...
the only gotcha is that that require a static initial value... since
the function in question give you tick since the begenning of the
program... so you need
to convert t=0 to a real time once and store it in a static variable
to be able to provide an emulation of clock_getttime

I'm concerned about static variable in ure... and how to properly and
racelessly initialize it...

Norbert


More information about the LibreOffice mailing list