Determines when has this process finished running. If the process is still alive, the current time is returned instead. @rtype: win32.SYSTEMTIME @return: Process exit time.
(self)
| 788 | return win32.FileTimeToSystemTime(CreationTime) |
| 789 | |
| 790 | def get_exit_time(self): |
| 791 | """ |
| 792 | Determines when has this process finished running. |
| 793 | If the process is still alive, the current time is returned instead. |
| 794 | |
| 795 | @rtype: win32.SYSTEMTIME |
| 796 | @return: Process exit time. |
| 797 | """ |
| 798 | if self.is_alive(): |
| 799 | ExitTime = win32.GetSystemTimeAsFileTime() |
| 800 | else: |
| 801 | if win32.PROCESS_ALL_ACCESS == win32.PROCESS_ALL_ACCESS_VISTA: |
| 802 | dwAccess = win32.PROCESS_QUERY_LIMITED_INFORMATION |
| 803 | else: |
| 804 | dwAccess = win32.PROCESS_QUERY_INFORMATION |
| 805 | hProcess = self.get_handle(dwAccess) |
| 806 | ExitTime = win32.GetProcessTimes(hProcess)[1] |
| 807 | return win32.FileTimeToSystemTime(ExitTime) |
| 808 | |
| 809 | def get_running_time(self): |
| 810 | """ |
nothing calls this directly
no test coverage detected