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

From: John Levine <johnl_at_iecc.com>
Date: Tue, 12 Jul 2022 16:49:56 UTC
It appears that Frank Leonhardt <freebsd-doc@fjl.co.uk> said:
>I can get the time since the epoch to the nearest second (date +%s), but 
>nothing more accurate. This was probably good enough in the 1970s but I 
>think it's reasonable to want a better resolution even in a shell script.

If you have perl installed, which most systems do, this should work:

$ perl -MTime::HiRes -e 'print Time::HiRes::time;'