Skip to content

Instantly share code, notes, and snippets.

@lu0
Created May 1, 2022 23:14
Show Gist options
  • Save lu0/8f9603dd47e04d9e8c7f65fcbc4b9fe1 to your computer and use it in GitHub Desktop.
Save lu0/8f9603dd47e04d9e8c7f65fcbc4b9fe1 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Generate unix timestamps in milliseconds
# ./unix-timestamp-generator.sh <seconds> > timestamps.log
run_during_seconds=${1:-2}
end_time=$(( SECONDS + run_during_seconds ))
while [ $SECONDS -lt $end_time ]; do
/usr/bin/env date +%s%3N
# sleep 100 milliseconds
sleep 0.1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment