संपादित करें

इसके माध्यम से साझा किया गया


ProcessThread.PrivilegedProcessorTime Property

Definition

Gets the amount of time that the thread has spent running code inside the operating system core.

public:
 property TimeSpan PrivilegedProcessorTime { TimeSpan get(); };
public TimeSpan PrivilegedProcessorTime { get; }
[System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public TimeSpan PrivilegedProcessorTime { get; }
member this.PrivilegedProcessorTime : TimeSpan
[<System.Runtime.Versioning.SupportedOSPlatform("maccatalyst")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
member this.PrivilegedProcessorTime : TimeSpan
Public ReadOnly Property PrivilegedProcessorTime As TimeSpan

Property Value

A TimeSpan indicating the amount of time that the thread has spent running code inside the operating system core.

Attributes

Exceptions

The thread time could not be retrieved.

The process is on a remote computer.

Remarks

Windows uses several different protection mechanisms, and at the root of them all is the distinction between user mode and privileged mode. PrivilegedProcessorTime corresponds to the amount of time that the application has spent running in privileged mode, inside the operating system core. The UserProcessorTime property indicates the amount of time that the application has spent running code in user mode, outside the system core.

User mode restricts the application in two important ways. First, the application cannot directly access the peripherals, but instead must call the operating system core to get or set peripheral data. The operating system can thus ensure that one application does not destroy peripheral data that is needed by another. Second, the application cannot read or change data that the operating system itself maintains. This restriction prevents applications from either inadvertently or intentionally corrupting the core. If the application needs the operating system to perform an operation, it calls one of the system's routines. Many of these transition into privileged mode, perform the operation, and smoothly return to user mode.

Applies to

See also