refactor: date +%s%3N should work on Linux (or print only seconds)

This commit is contained in:
Jorge Bucaran 2019-01-12 11:22:45 +09:00
parent e1469e5a39
commit 37335526dc
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 \*BSD
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" '{ print $0 - ELAPSED }'
math (command date "+%s%3N") - "0$elapsed"
end
end