close
Dim List As System.Diagnostics.ProcessThreadCollection
List = System.Diagnostics.Process.GetCurrentProcess().Threads()
Dim objThread As System.Diagnostics.ProcessThread
Console.WriteLine()
For Each objThread In List
Console.Write("Thread: {0:D5}", objThread.Id)
Console.Write(" Start: {0}", objThread.StartTime)
Console.WriteLine(" CPU Time: {0}", objThread.TotalProcessorTime)
Console.Write(" State: {0}", objThread.ThreadState)
If (objThread.ThreadState = System.Diagnostics.ThreadState.Wait) Then
Console.Write("Reason: {0}", objThread.WaitReason())
End If
Console.WriteLine(" Address: {0}", objThread.StartAddress())
Console.WriteLine()
Next
文章標籤
全站熱搜
留言列表