p5-time-moment icon indicating copy to clipboard operation
p5-time-moment copied to clipboard

%9N always produces micro secs x 1000

Open foobargeez opened this issue 5 years ago • 1 comments

Firstly, thanks for all the effort you put into this module -- I am a heavy user of this.

$> perl -MTime::Moment -e'print Time::Moment->now->strftime("%Y-%m-%dT%H:%M:%S.%9N%:z")'
2019-11-19T23:05:19.437942000-05:00
$>

Any way we can make the %9N be more precise in the logging the last three digits too and not simply append 000 (or multiply by 1000) to micro secs?

Thanks!

foobargeez avatar Nov 20 '19 04:11 foobargeez

Internally Time::Moment uses gettimeofday() which was the most portable option to obtain higher resolution times.

chansen avatar Jul 23 '23 09:07 chansen