| 1 | #!/bin/sh |
| 2 | # The time in nanoseconds, for the timing scripts: date +%s%N is GNU's; |
| 3 | # BSD's date prints a literal N there, and perl, which macOS has, then |
| 4 | # gives the time. |
| 5 | n=$(date +%s%N) |
| 6 | case $n in |
| 7 | *N) perl -MTime::HiRes=time -e 'printf "%.0f\n", time * 1e9' ;; |
| 8 | *) echo "$n" ;; |
| 9 | esac |