Date: Fri, 11 Mar 2022 17:17:11 +0100 From: Hans Petter Selasky <hps@selasky.org> To: gljennjohn@gmail.com Cc: Alexander Leidinger <Alexander@leidinger.net>, current@freebsd.org Subject: Re: What are the in-kernel functions to format time? Message-ID: <bb5c14c0-e66d-ca5a-db08-ed9c11c73da9@selasky.org> In-Reply-To: <20220311122039.4ecff61c@ernst.home> References: <20220311104942.Horde.BX4nDaPVTH6Lz85SCVNcopM@webmail.leidinger.net> <cb18f4a3-f43f-78e5-843e-b2d2aaf9fefa@selasky.org> <20220311122039.4ecff61c@ernst.home>
next in thread | previous in thread | raw e-mail | index | archive | help
On 3/11/22 12:20, Gary Jennejohn wrote: > Do you mean the %zd? kvprintf() checks for a zflag and handles the > argument as size_t or ssize_t, depending on whether the sign is > positive or negative. Hi, Given that time is a 64-bit value, then probably "%llu", and (unsigned long long)bintime would do it, but then you need that cast. ./_types.h:typedef __int64_t __sbintime_t; I was tinking of a %XXX that divides the value somehow into something more readable, maybe suffixing "ns" or "ms" or "us" or something. --HPS
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bb5c14c0-e66d-ca5a-db08-ed9c11c73da9>