[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1] Use CLOCK_MONOTONIC_RAW if available for get_clock().
From: |
Peter Maydell |
Subject: |
Re: [PATCH v1] Use CLOCK_MONOTONIC_RAW if available for get_clock(). |
Date: |
Thu, 30 Sep 2021 17:10:16 +0100 |
On Thu, 30 Sept 2021 at 17:04, Joe Tanen <jtanen@fb.com> wrote:
>
> CLOCK_MONOTONIC_RAW provides an unadjusted system clock on some platforms,
> which is closer in spirit to providing a guest with a raw hardware clock than
> CLOCK_MONOTONIC.
>
> Using CLOCK_MONOTONIC_RAW also works around a current issue in OSX where
> CLOCK_MONOTONIC has been observed to go backwards.
>
> Since CLOCK_MONOTONIC_RAW might not be available on all platforms, revert to
> using CLOCK_MONOTONIC if it is not present.
>
> Signed-off-by: Joe Tanen <jtanen@fb.com>
I'm not sure we want to change behaviour everywhere to work
around an OSX bug, though...
Has this bug been reported to Apple ? Is there some kind of bug
report ID or URL we can quote in the commit message ?
-- PMM