NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/60315: monotonic clock with or without time suspended
The following reply was made to PR kern/60315; it has been noted by GNATS.
From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: gnats-bugs%NetBSD.org@localhost, netbsd-bugs%NetBSD.org@localhost
Cc:
Subject: Re: kern/60315: monotonic clock with or without time suspended
Date: Mon, 8 Jun 2026 13:39:59 +0000
This is a multi-part message in MIME format.
--=_NC1g7Zx04aXuOv/BTjb2XxgNiNEdj0K7
[a brief lesson on why actual authoritative references are important
and why hearsay is inadmissible as evidence]
--=_NC1g7Zx04aXuOv/BTjb2XxgNiNEdj0K7
Content-Type: message/rfc822
Content-Disposition: inline
Date: Mon, 8 Jun 2026 15:37:45 +0200
From: Anders Magnusson <ragge%tethuvudet.se@localhost>
To: Taylor R Campbell <riastradh%NetBSD.org@localhost>,
x85729201kza <x85729201kza%outlook.com@localhost>
Cc: tech-kern%NetBSD.org@localhost
Subject: Re: Clarification of CLOCK_MONOTONIC
Message-ID: <6d1d64d9-edb6-46db-b325-0f003e558777%tethuvudet.se@localhost>
In-Reply-To: <20260608131712.D059684CD8%mail.netbsd.org@localhost>
References: <20260608131712.D059684CD8%mail.netbsd.org@localhost>
MIME-Version: 1.0
Content-Language: sv
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
FYI; slight correction;
>
> * macOS
>
> By hearsay [MOZILLATIME], since I am having trouble finding macOS man
> pages on the web, it sounds like:
>
> - CLOCK_MONOTONIC counts time since boot, incl. suspend
> - CLOCK_MONOTONIC_RAW counts time running since boot, excl. suspend
>
The manpage on MacOS says:
CLOCK_MONOTONIC
clock that increments monotonically, tracking the time
since an arbitrary point, and will continue to
increment while the system is asleep.
CLOCK_MONOTONIC_RAW
clock that increments monotonically, tracking the time
since an arbitrary point like CLOCK_MONOTONIC.
However, this clock is unaffected by frequency or time
adjustments. It should not be compared to other
system time sources.
CLOCK_UPTIME_RAW
clock that increments monotonically, in the same
manner as CLOCK_MONOTONIC_RAW, but that does not
increment while the system is asleep. The returned
value is identical to the result of
mach_absolute_time() after the appropriate
mach_timebase conversion is applied.
--=_NC1g7Zx04aXuOv/BTjb2XxgNiNEdj0K7--
Home |
Main Index |
Thread Index |
Old Index