MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / get_exit_time

Method get_exit_time

pydevd_attach_to_process/winappdbg/process.py:790–807  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 """

Callers

nothing calls this directly

Calls 2

is_aliveMethod · 0.95
get_handleMethod · 0.95

Tested by

no test coverage detected