File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1111 fid = fopen(' /proc/version' );
1212 if fid >= 1
1313 v = fscanf(fid , ' %s ' );
14- if fclose(fid ) ~= 0
15- w = - 1 ;
16- elseif endsWith(v , " microsoft-standard-WSL2" )
14+ fclose(fid );
15+ if endsWith(v , " microsoft-standard-WSL2" )
1716 w = 2 ;
1817 elseif endsWith(v , " -Microsoft" )
1918 w = 1 ;
Original file line number Diff line number Diff line change 1111
1212bytes = uint64(0 );
1313
14- % .NET is about 10 times SLOWER than Java
15- if ispc() && ~stdlib .has_java() && stdlib .has_dotnet()
14+
15+ if ispc() && stdlib .has_dotnet()
16+ % about the same speed as the Java version below.
1617 h = NET .addAssembly(' Microsoft.VisualBasic' );
1718 ci = Microsoft .VisualBasic .Devices .ComputerInfo();
1819 bytes = ci .TotalPhysicalMemory ;
19- delete(h );
20+ delete(h )
2021elseif stdlib .has_java()
2122 b = javaMethod(" getOperatingSystemMXBean" , " java.lang.management.ManagementFactory" );
2223
You can’t perform that action at this time.
0 commit comments