fix: print result even if t1-t0 equals 0; close #508

This commit is contained in:
Jorge Bucaran 2019-01-12 10:59:54 +09:00
parent 41ef268684
commit fff873955a
No known key found for this signature in database
GPG key ID: E54BA3C0E646DB30

View file

@ -473,6 +473,6 @@ function _fisher_now -a elapsed
case Darwin FreeBSD
command perl -MTime::HiRes -e 'printf("%.0f\n", (Time::HiRes::time() * 1000) - $ARGV[0])' $elapsed
case \*
command date "+%s%3N" | command awk -v ELAPSED="$elapsed" '{ sub(/%?3N$/, "000") } $0 -= ELAPSED'
command date "+%s%3N" | command awk -v ELAPSED="$elapsed" '{ print $0 - ELAPSED }'
end
end