mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 13:15:07 +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]
|
[PublicAPI]
|
||||||
public static TimeSpan GetSystemUptime()
|
public static TimeSpan GetSystemUptime()
|
||||||
{
|
{
|
||||||
// TODO
|
return TimeSpan.FromMilliseconds(Environment.TickCount);
|
||||||
return default(TimeSpan);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -153,8 +152,8 @@ namespace ICD.Common.Utils
|
|||||||
[PublicAPI]
|
[PublicAPI]
|
||||||
public static TimeSpan GetProgramUptime()
|
public static TimeSpan GetProgramUptime()
|
||||||
{
|
{
|
||||||
// TODO
|
var current = System.Diagnostics.Process.GetCurrentProcess();
|
||||||
return default(TimeSpan);
|
return IcdEnvironment.GetLocalTime() - current.StartTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user