Use new .NET 2.0 API to get processor count.

This commit is contained in:
jfrijters 2008-04-23 05:22:31 +00:00
Родитель d23e21777f
Коммит 6a1c4cea55
1 изменённых файлов: 1 добавлений и 15 удалений

Просмотреть файл

@ -3335,21 +3335,7 @@ namespace IKVM.NativeCode.java
{
public static int availableProcessors(object thisRuntime)
{
string s = JVM.SafeGetEnvironmentVariable("NUMBER_OF_PROCESSORS");
if (s != null)
{
try
{
return Int32.Parse(s, NumberFormatInfo.InvariantInfo);
}
catch (FormatException)
{
}
catch (OverflowException)
{
}
}
return 1;
return Environment.ProcessorCount;
}
public static long freeMemory(object thisRuntime)