diff --git a/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx b/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx index 7fbe6aa096382..397893e8bf03a 100644 --- a/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx +++ b/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx @@ -1,17 +1,17 @@  - @@ -4337,4 +4337,10 @@ Only array or span of primitive or enum types can be initialized from static data. + + Could not get all running Process IDs. + + + Failed to set or retrieve rusage information. See the error code for OS-specific error information. + diff --git a/src/libraries/System.Private.CoreLib/src/System/Environment.Browser.cs b/src/libraries/System.Private.CoreLib/src/System/Environment.Browser.cs index 75a2633e67e34..4815ef73615b0 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Environment.Browser.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Environment.Browser.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.IO; +using System.Runtime.Versioning; namespace System { diff --git a/src/libraries/System.Private.CoreLib/src/System/Environment.OSX.cs b/src/libraries/System.Private.CoreLib/src/System/Environment.OSX.cs index 82b6345ff40e1..c13a975b198d8 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Environment.OSX.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Environment.OSX.cs @@ -1,6 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. +using System.Diagnostics; using System.Runtime.InteropServices; using System.Runtime.Versioning; @@ -26,6 +27,8 @@ public static ProcessCpuUsage CpuUsage } } + private const int NanosecondsTo100NanosecondsFactor = 100; + private static volatile uint s_timeBase_numer, s_timeBase_denom; private static TimeSpan MapTime(ulong sysTime) { diff --git a/src/libraries/System.Private.CoreLib/src/System/Environment.iOS.cs b/src/libraries/System.Private.CoreLib/src/System/Environment.iOS.cs index 58a85227101bc..b6bd6a16bdb7d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Environment.iOS.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Environment.iOS.cs @@ -25,7 +25,7 @@ public static partial class Environment [UnsupportedOSPlatform("tvos")] public static ProcessCpuUsage CpuUsage { - get { throw new PlatformNotSupportedException(); } + get => new ProcessCpuUsage { UserTime = TimeSpan.Zero, PrivilegedTime = TimeSpan.Zero }; } #endif