ProcessThread.TotalProcessorTime 屬性

定義

取得這個執行緒使用處理器所耗用的總時間量。Gets the total amount of time that this thread has spent using the processor.

public:
 property TimeSpan TotalProcessorTime { TimeSpan get(); };
public TimeSpan TotalProcessorTime { get; }
member this.TotalProcessorTime : TimeSpan
Public ReadOnly Property TotalProcessorTime As TimeSpan

屬性值

TimeSpan,表示執行緒已控制處理器的時間量。A TimeSpan that indicates the amount of time that the thread has had control of the processor.

例外狀況

無法擷取執行緒時間。The thread time could not be retrieved.

處理序位於遠端電腦上。The process is on a remote computer.

備註

TotalProcessorTime屬性會指出系統已將執行緒從等候狀態中取出, 並在任何處理器上給予其優先順序的總時間量。The TotalProcessorTime property indicates the total amount of time that the system has taken the thread out of the wait state and given it priority on any processor. 在多處理器系統上, 如果執行緒使用一個以上的處理器, 此值會包含每個處理器花費的時間。On a multiple processor system, this value would include time spent on each processor, if the thread used more than one processor.

屬性是UserProcessorTimePrivilegedProcessorTime屬性的總和。 TotalProcessorTimeThe TotalProcessorTime property is the sum of the UserProcessorTime and PrivilegedProcessorTime properties.

適用於

另請參閱