Skip to content

Commit

Permalink
Replacing date/gdate with perl program to improve compatibility acros…
Browse files Browse the repository at this point in the history
…s unix systems
  • Loading branch information
Robertorosmaninho committed Sep 11, 2023
1 parent f3e2923 commit 7e8cd54
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions bin/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,9 @@ export DEPTH=0
verbose=${verbose:-false}
profile=${profile:-false}

if [[ "$OSTYPE" == "darwin"* ]]; then
DATE_CMD="gdate"
else
DATE_CMD="date"
fi

time_now_ms () {
"$DATE_CMD" "+%s%3N"
perl -MTime::HiRes=time -e 'printf "%d\n", time*1000'
}

indented () {
Expand Down

0 comments on commit 7e8cd54

Please sign in to comment.