Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Sep 2021 11:02:56 -0600
From:      Ian Lepore <ian@freebsd.org>
To:        marklmi@yahoo.com, freebsd-ports@freebsd.org, Bryan Drewery <bdrewery@FreeBSD.org>
Cc:        freebsd-current <freebsd-current@freebsd.org>, Free BSD <freebsd-arm@freebsd.org>
Subject:   Re: I get odd time reports from poudriere on armv7 system, under a (non-debug) main [so: 14] FreeBSD.
Message-ID:  <e20c23c3b540203680ce79d8756aa21aaeb96612.camel@freebsd.org>
In-Reply-To: <187B69AF-9465-41DE-BFD0-A4AA0F7F9068@yahoo.com>
References:  <C6D3F55B-C567-4EED-AC88-B6C18F6C6154@yahoo.com> <187B69AF-9465-41DE-BFD0-A4AA0F7F9068@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e20c23c3b540203680ce79d8756aa21aaeb96612.camel>