clock_getres.2: Minor tweaks to example

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2020-04-04 10:50:36 +02:00
parent a04e44bd3a
commit bef940caef
1 changed files with 10 additions and 10 deletions

View File

@ -406,14 +406,14 @@ This is an example of what we might see when running the program:
.in +4n
.EX
$ \fB./clock_times x\fP
CLOCK_REALTIME : 1585985459.446 (18356 days + 7h 30m 59s)
resolution: 0.000000001
CLOCK_TAI : 1585985496.447 (18356 days + 7h 31m 36s)
resolution: 0.000000001
CLOCK_MONOTONIC : 52395.722 (14h 33m 15s)
resolution: 0.000000001
CLOCK_BOOTTIME : 72691.019 (20h 11m 31s)
resolution: 0.000000001
CLOCK_REALTIME : 1585985459.446 (18356 days + 7h 30m 59s)
resolution: 0.000000001
CLOCK_TAI : 1585985496.447 (18356 days + 7h 31m 36s)
resolution: 0.000000001
CLOCK_MONOTONIC: 52395.722 (14h 33m 15s)
resolution: 0.000000001
CLOCK_BOOTTIME : 72691.019 (20h 11m 31s)
resolution: 0.000000001
.EE
.in
.SS Program source
@ -442,7 +442,7 @@ displayClock(clockid_t clock, char *name, bool showRes)
exit(EXIT_FAILURE);
}
printf("%\-22s: %10ld.%03ld (", name,
printf("%\-15s: %10ld.%03ld (", name,
(long) ts.tv_sec, ts.tv_nsec / 1000000);
long days = ts.tv_sec / SECS_IN_DAY;
@ -459,7 +459,7 @@ displayClock(clockid_t clock, char *name, bool showRes)
}
if (showRes)
printf(" resolution: %10ld.%09ld\en",
printf(" resolution: %10ld.%09ld\en",
(long) ts.tv_sec, ts.tv_nsec);
}