Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jul 2022 13:58:06 -0400
From:      grarpamp <grarpamp@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: How do get elapsed time in milliseconds in a shell script?
Message-ID:  <CAD2Ti2-Yex5UJXMsDVsyRdgF07ydjQ6v22Y918cKPDu0-w9Ofg@mail.gmail.com>
In-Reply-To: <20220712164956.E1C884588F2D@ary.qy>
References:  <4c98bb6d-a128-d10b-a896-6af11c06d41c@fjl.co.uk> <20220712164956.E1C884588F2D@ary.qy>

next in thread | previous in thread | raw e-mail | index | archive | help
> $ perl -MTime::HiRes -e 'print Time::HiRes::time;'

Not base.

Debug verbose...
local ticks (ntpdate, ntpq, cpucontrol, ...)
remote headers (fetch, openssl tls, ...)

Mind the application...
If called fast enough many things will collide even out beyond msec.
mktemp, hash random, ... offer crypto levels of anti-collide but aren't time.
String concats of the two are unique but not sortable within the collision.
HW SW tickers, sysctl counters, ... may all jump, reset, wrap, be admin'd.



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