You can use following function to Get Process elapse time in minutes
GetProcTime() {
local p=$1
ps -eao "%C %U %c %t" |
awk "/$p/"'{print $4}' |
awk -F":" '{{a=$1*60} {b=a+$2}; if ( NF != 2 ) print b ; else print $1 }'
}
Test
root@ubuntu:/tmp# GetProcTime monit
03
root@ubuntu:/tmp# GetProcTime apache2
104
104
104
104
104
104
root@ubuntu:/tmp# GetProcTime init
460
root@ubuntu:/tmp# uptime
15:34:56 up 7:40, 1 user, load average: 0.00, 0.01, 0.05
root@ubuntu:/tmp# echo $(( 460 / 60 ))
7