public final class RuntimeUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
getAvailableProcessors()
Faster way to get the number of processors in the system.
|
public static int getAvailableProcessors()
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.
Copyright © 2016. All rights reserved.