Re: I get odd time reports from poudriere on armv7 system, under a (non-debug) main [so: 14] FreeBSD.
- Reply: Mark Millard via freebsd-ports : "Re: I get odd time reports from poudriere on armv7 system, under a (non-debug) main [so: 14] FreeBSD."
- In reply to: Mark Millard via freebsd-current : "Re: I get odd time reports from poudriere on armv7 system, under a (non-debug) main [so: 14] FreeBSD."
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 26 Sep 2021 17:02:56 UTC
On Sun, 2021-09-26 at 02:27 -0700, Mark Millard via freebsd-current wrote: > On 2021-Sep-25, at 23:25, Mark Millard <marklmi at yahoo.com> wrote: > > > [...] > if (argc == 3 && strcmp(argv[2], "-nsec") == 0) > printf("%ld.%ld\n", ts.tv_sec, ts.tv_nsec); There are two problems with this, both the seconds and nanos are printed incorrectly. The correct incantation would be printf("%jd.%09ld\n", (intmax_t)ts.tv_sec, ts.tv_nsec); -- Ian