[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH] Autodetect clock_gettime
From: |
Tristan Gingold |
Subject: |
[Qemu-devel] Re: [PATCH] Autodetect clock_gettime |
Date: |
Tue, 15 Mar 2011 14:47:19 +0100 |
On Mar 15, 2011, at 2:34 PM, Paolo Bonzini wrote:
> On 03/15/2011 02:16 PM, Tristan Gingold wrote:
>> Some POSIX OSes (such as Darwin) doesn't have clock_gettime. This patch
>> falls back on gettimeofday if clock_gettime is not available.
>
> This may be okay as a stopgap measure, but any sane porting target for QEMU
> should have a monotonic clock. In fact, Darwin has it.
Yes mach primitives could be used. But why isn't a monotonic clock used on
Linux ? According to man, CLOCK_MONOTONIC is monotonic
while CLOCK_REALTIME isn't.
Tristan.