| 861 | */ |
| 862 | |
| 863 | static double running_time( HANDLE const process ) |
| 864 | { |
| 865 | FILETIME creation; |
| 866 | FILETIME exit; |
| 867 | FILETIME kernel; |
| 868 | FILETIME user; |
| 869 | if ( GetProcessTimes( process, &creation, &exit, &kernel, &user ) ) |
| 870 | { |
| 871 | /* Compute the elapsed time. */ |
| 872 | FILETIME current; |
| 873 | GetSystemTimeAsFileTime( ¤t ); |
| 874 | return filetime_to_seconds( add_FILETIME( current, |
| 875 | negate_FILETIME( creation ) ) ); |
| 876 | } |
| 877 | return 0.0; |
| 878 | } |
| 879 | |
| 880 | |
| 881 | /* |
no test coverage detected