diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-08-03 16:43:29 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-08-03 17:40:46 +0200 |
commit | 27ec691bfd4088b678aa18d0bad90be47d0357f4 (patch) | |
tree | 97217597b2c79361ca891d3a23bd880bcf2aa972 /src/bootchart | |
parent | 5ef9b2203e027da168b18d92045462422895565b (diff) |
tree-wide: convert bootchart and lldp code to use clock_boottime_or_monotonic()
We should avoid using CLOCK_BOOTTIME directly unless we actually can
sensible distuingish it from CLOCK_MONOTONIC. CLOCK_BOOTTIME is only
fully feature on very recent Linux kernels, hence we should stick to a
fallback logic, which is already available in the
clock_boottime_or_monotonic() call.
Diffstat (limited to 'src/bootchart')
-rw-r--r-- | src/bootchart/bootchart.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootchart/bootchart.c b/src/bootchart/bootchart.c index 1625d51fa8..322cec84a9 100644 --- a/src/bootchart/bootchart.c +++ b/src/bootchart/bootchart.c @@ -367,7 +367,7 @@ int main(int argc, char *argv[]) { struct timespec n; double uptime; - clock_gettime(CLOCK_BOOTTIME, &n); + clock_gettime(clock_boottime_or_monotonic(), &n); uptime = (n.tv_sec + (n.tv_nsec / (double) NSEC_PER_SEC)); log_start = gettime_ns(); |