NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/60315: monotonic clock with or without time suspended



>Number:         60315
>Category:       kern
>Synopsis:       monotonic clock with or without time suspended
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 08 13:15:00 +0000 2026
>Originator:     Taylor R Campbell
>Release:        current, 11, 10, 9, ...
>Organization:
Acme Monotonic Clocks, Inc.
>Environment:
>Description:

	Does CLOCK_MONOTONIC keep counting time or not while the system
	is suspended?

	The answer is unclear from the documentation and the
	requirements are not obvious from the text of POSIX.

	Original discussion:
	https://mail-index.netbsd.org/tech-kern/2026/06/07/msg031069.html

>How-To-Repeat:

	docs inspection

	science

>Fix:

	We should adopt CLOCK_BOOTTIME and CLOCK_UPTIME for the two
	answers (respectively: yes, incl. suspend; no, time running
	only, excl. suspend) from FreeBSD and OpenBSD.  Linux also
	defines CLOCK_BOOTTIME (but not CLOCK_UPTIME) with the same
	semantics.




Home | Main Index | Thread Index | Old Index