I'm running scripts that take 10-80 minutes. I would like to be able to print the script running time each 1/5/10 minutes ( as i choose).
For example i have a script where i'm creating tables and inserting data to a DB and want to measure the time through the script.
So lets say i have some printing msgs like
"Table 1 has been created"
, "Data inserted to Table 2"
etc.
Between those msgs i want to add like:
The script is running for 1 minutes
The script is running for 2 minutes
The script is running for 3 minutes
Etc...
Someone know what is the best practice for it ?
Thanks in advance !