java.lang.Object
com.aoapps.lang.RuntimeUtils
Runtime utilities that enhance behavior of java.lang.Runtime.
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
Faster way to get the number of processors in the system.
-
Method Details
-
getAvailableProcessors
public static int getAvailableProcessors()Faster way to get the number of processors in the system.The call the Runtime.availableProcessors is prohibitively slow (at least in Java 1.6 on Debian 6). The number of processors in a system is unlikely to change frequently. This will only call Runtime.availableProcessors once a second.
-