Date: Tue, 19 Jul 2022 15:09:30 +0100 From: Frank Leonhardt <freebsd-doc@fjl.co.uk> To: questions@freebsd.org Subject: Re: How do get elapsed time in milliseconds in a shell script? Message-ID: <1c2043cd-0db0-6df5-ffae-4adcd55dc1c7@fjl.co.uk> In-Reply-To: <20220718154227.0b56d2e08c41b1849769c49f@sohara.org> References: <b2107a6a-7b58-9e26-63f4-6a4c71393e2c@panix.com> <20220712194432.AA49E458B955@ary.qy> <20220712205754.928c3f921f42f66fb977f891@sohara.org> <77a16f8f-a70a-3abf-02be-70b1d252bd36@iecc.com> <735428d6-aeeb-2539-c1fa-aee0baf2506e@fjl.co.uk> <20220718154227.0b56d2e08c41b1849769c49f@sohara.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 18/07/2022 15:42, Steve O'Hara-Smith wrote: > On Mon, 18 Jul 2022 14:01:01 +0100 > freebsd-doc@fjl.co.uk wrote: > >> I think what may be needed is a base utility to produce the accurate >> tick since the epoch or boot - it doesn't' matter for timeing. Possibly >> an extension to "uptime", which I assume must know. > There are some counters exposed via sysctl which might be useful, > kern.timecounter.tc.HPET.counter looks promising, the rest seem to cycle > rather quickly. Of course portability is an issue with using these. Yes - looks good to me, but not portable. Best FreeBSD-specific method so far.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1c2043cd-0db0-6df5-ffae-4adcd55dc1c7>