mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-01-11 19:44:55 +00:00
feat: Implemented Processor Utils for Net Standard to get the system uptime and the program uptime.
This commit is contained in:
@@ -142,8 +142,7 @@ namespace ICD.Common.Utils
|
||||
[PublicAPI]
|
||||
public static TimeSpan GetSystemUptime()
|
||||
{
|
||||
// TODO
|
||||
return default(TimeSpan);
|
||||
return TimeSpan.FromMilliseconds(Environment.TickCount);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -153,8 +152,8 @@ namespace ICD.Common.Utils
|
||||
[PublicAPI]
|
||||
public static TimeSpan GetProgramUptime()
|
||||
{
|
||||
// TODO
|
||||
return default(TimeSpan);
|
||||
var current = System.Diagnostics.Process.GetCurrentProcess();
|
||||
return IcdEnvironment.GetLocalTime() - current.StartTime;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user