How to get the service start time and service end time in the window service?
You can use the Note that you can call ExitTime only on the process that is complete, and before you exit it, you need to process it. System.Diagnostics.Process class. In particular, startup and outtime properties
// System.Diagnostics.Process p = System.Diagnostics.Process.GetCurrentProcess (); System.Diagnostics.Process p = System.Diagnostics.Process.GetProcessById (6684); Console.WriteLine (p.StartTime); // ... console.print line (p. Extratime);
Comments
Post a Comment