| 961 | */ |
| 962 | |
| 963 | static double running_time( HANDLE const process ) |
| 964 | { |
| 965 | FILETIME creation; |
| 966 | FILETIME exit; |
| 967 | FILETIME kernel; |
| 968 | FILETIME user; |
| 969 | if ( GetProcessTimes( process, &creation, &exit, &kernel, &user ) ) |
| 970 | { |
| 971 | /* Compute the elapsed time. */ |
| 972 | FILETIME current; |
| 973 | GetSystemTimeAsFileTime( ¤t ); |
| 974 | return filetime_to_seconds( add_FILETIME( current, |
| 975 | negate_FILETIME( creation ) ) ); |
| 976 | } |
| 977 | return 0.0; |
| 978 | } |
| 979 | |
| 980 | |
| 981 | /* |
no test coverage detected