Trying to use ps to find the number of seconds since a process started. The version of ps I have doesn't support etimes and not sure how else to get this info?
date +%s is giving the current date since the Unix epoch, e.g. 1479125355 now in November 14th, 2016.
stat -c %Y /proc/1234/status is giving the start time of process 1234 since Unix epoch. You want the difference. Perhaps use (barely tested, my interactive shell is zsh)
$[$(date +%s) - $(stat -c %Y /proc/1234/status)]; adapt that to your shell.
bash -c 'sleep 4; echo $(($(date +%s) - $(stat -c %Y /proc/$$/status)))'
is giving me 4 as expected. Of course the
$$ is expanded to the pid of the
bash -c command