Comment 5 for bug 647472

Stephan (world-wide) wrote :

This is no specific issue of procps, it just returns the value from the kernel. The kernel documents (in the source) that the value includes the time spent in suspend.

/proc/uptime gets the value from here:

https://elixir.bootlin.com/linux/v4.20.3/source/include/linux/timekeeping.h#L93

/**
 * ktime_get_boottime - Returns monotonic time since boot in ktime_t format
 *
 * This is similar to CLOCK_MONTONIC/ktime_get, but also includes the
 * time spent in suspend.
 */
static inline ktime_t ktime_get_boottime(void)
{
 return ktime_get_with_offset(TK_OFFS_BOOT);
}