Re: How do get elapsed time in milliseconds in a shell script?

From: Frank Leonhardt <freebsd-doc_at_fjl.co.uk>
Date: Tue, 19 Jul 2022 14:09:30 UTC
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.