Use available command date if perl is not avail. in Darwin/FreeBSD.

This commit is contained in:
Jorge Bucaran 2016-05-17 14:59:37 +09:00
parent 3197d68fbb
commit 257ef061db
No known key found for this signature in database
GPG key ID: E54BA3C0E646DB30

View file

@ -1861,7 +1861,11 @@ switch (command uname)
set elapsed 0
end
perl -MTime::HiRes -e 'printf("%.0f\n", (Time::HiRes::time() * 1000) - '$elapsed')'
if command -s perl > /dev/null
perl -MTime::HiRes -e 'printf("%.0f\n", (Time::HiRes::time() * 1000) - '$elapsed')'
else
math (command date "+%s") - $elapsed
end
end
case \*