System.Diagnostics.ProcessThread.GetThreadTimes C# (CSharp) Method

GetThreadTimes() private method

Gets timing information for the thread.
private GetThreadTimes ( ) : System.Diagnostics.ProcessThreadTimes
return System.Diagnostics.ProcessThreadTimes
        private ProcessThreadTimes GetThreadTimes()
        {
            using (SafeThreadHandle threadHandle = OpenThreadHandle(Interop.Kernel32.ThreadOptions.THREAD_QUERY_INFORMATION))
            {
                var threadTimes = new ProcessThreadTimes();
                if (!Interop.Kernel32.GetThreadTimes(threadHandle,
                    out threadTimes._create, out threadTimes._exit,
                    out threadTimes._kernel, out threadTimes._user))
                {
                    throw new Win32Exception();
                }
                return threadTimes;
            }
        }