File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2288,6 +2288,31 @@ public bool VirtualizationEnabled
22882288 /// </summary>
22892289 public long SecurityDomain => GetSecurityDomain ( ) ;
22902290
2291+ /// <summary>
2292+ /// Get the creation time of the process.
2293+ /// </summary>
2294+ public DateTime CreateTime => DateTime . FromFileTime ( Query < KernelUserTimes > ( ProcessInformationClass . ProcessTimes ) . CreateTime . QuadPart ) ;
2295+ /// <summary>
2296+ /// Get the exit time of the process.
2297+ /// </summary>
2298+ public DateTime ExitTime => DateTime . FromFileTime ( Query < KernelUserTimes > ( ProcessInformationClass . ProcessTimes ) . ExitTime . QuadPart ) ;
2299+ /// <summary>
2300+ /// Get the time spent in the kernel.
2301+ /// </summary>
2302+ public long KernelTime => Query < KernelUserTimes > ( ProcessInformationClass . ProcessTimes ) . KernelTime . QuadPart ;
2303+ /// <summary>
2304+ /// Get the time spent in user mode.
2305+ /// </summary>
2306+ public long UserTime => Query < KernelUserTimes > ( ProcessInformationClass . ProcessTimes ) . UserTime . QuadPart ;
2307+ /// <summary>
2308+ /// Get the time spent in the kernel in seconds.
2309+ /// </summary>
2310+ public double KernelTimeSeconds => new TimeSpan ( KernelTime ) . TotalSeconds ;
2311+ /// <summary>
2312+ /// Get the time spent in user mode.
2313+ /// </summary>
2314+ public double UserTimeSeconds => new TimeSpan ( UserTime ) . TotalSeconds ;
2315+
22912316 #endregion
22922317
22932318 #region Static Properties
Original file line number Diff line number Diff line change 1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
15- using NtApiDotNet . Ndr ;
1615using System ;
1716using System . Runtime . InteropServices ;
1817
You can’t perform that action at this time.
0 commit comments