Say, if we run some long command, such as a functional test for a website, is there a command such as:
elapsed npm test
where npm test
is a process or shell script possibly with several different commands that can take 45 minutes. It'd be nice if during the running, it can print out "22 minutes have elapsed" every minute or every 5 minutes.
The command time
can show the total time it takes, but not the time elapsed along the way.
ps -p PID -o etime
(I wrote as a comment as it is not a direct answer, I wouldn't expect a command to exists, yet ...)%E
fortime
command ?