Tag: date
-
Measuring elapsed time in milliseconds in bash
I was working on a Telemetry project in my company and I had to instrument some of our bash scripts with code that would measure elapsed time of script execution. You can easily achive this with the following code calculate_duration() { # Start time in nanoseconds start_time=$(date +%s%N)…