I have a PHP panel that has been ported from a linux box to a windows box. In the panel it shows the uptime for a specific process to let the use know how long the program on the system has been running. In linux this was easy because I could just pipe and regex a PS Aux with some flags to output the time. However, in Windows I can't figure out how to do it. I'm using this command to output information about the program thinking that CPU Time would be what I want:
tasklist /fi "imagename eq program.exe" /v
Well, as it turns out CPU time measures how much time the process has ran on any and all CPUs, which of course could be vastly different than real time depending on how many threads it's running on at any given time during the process.
So how can I use CMD to output a process' run time in real world terms?