/// <summary> /// Returns process timing information to the caller /// </summary> /// <param name="pid">The process id to check</param> /// <param name="buffer">A ProcesstTimesInfo struct to hold the process timing information</param> /// <param name="includeChildProcesses">Whether the result should include the execution times of all the child processes</param> public static int GetProcessTimes(int pid, ref ProcessTimesInfo buffer, bool includeChildProcesses) => GetProcessTimes(pid, ref buffer, Marshal.SizeOf(buffer), includeChildProcesses);
private static extern int GetProcessTimes(int pid, ref ProcessTimesInfo buffer, long bufferSize, bool includeChildProcesses);