This repository has been archived by the owner on May 4, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linux: use CLOCK_BOOTTIME if available
Use CLOCK_BOOTTIME to calculate the system uptime. Fall back to CLOCK_MONOTONIC if CLOCK_BOOTTIME is not available (all pre-2.6.39 kernels). The problem with CLOCK_MONOTONIC is that it doesn't increase when the system is suspended, making the uptime differ from what the uptime(1) tool reports.
- Loading branch information
1 parent
379ca42
commit 49d4e18
Showing
1 changed file
with
26 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters