Get the number of processor cores available to the VM - Hallo sahabat Teknologi Terbaru, Pada Artikel yang anda baca kali ini dengan judul Get the number of processor cores available to the VM, kami telah mempersiapkan artikel ini dengan baik untuk anda baca dan ambil informasi didalamnya. mudah-mudahan isi postingan yang kami tulis ini dapat anda pahami. baiklah, selamat membaca.
Judul : Get the number of processor cores available to the VM
link : Get the number of processor cores available to the VM
Get the number of processor cores available to the VM
The method Runtime.availableProcessors() returns the number of processor cores available to the VM, at least 1. Traditionally this returned the number currently online, but many mobile devices are able to take unused cores offline to save power, so releases newer than Android 4.2 (Jelly Bean) return the maximum number of cores that could be made available if there were no power or heat constraints.package example.com.androidprocessors;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
int availableProcessors = Runtime.getRuntime().availableProcessors();
Toast.makeText(MainActivity.this,
"Available Processors: " + availableProcessors,
Toast.LENGTH_LONG).show();
}
}
Demikianlah Artikel Get the number of processor cores available to the VM
Sekianlah artikel Get the number of processor cores available to the VM kali ini, mudah-mudahan bisa memberi manfaat untuk anda semua. baiklah, sampai jumpa di postingan artikel lainnya.
0 Response to "Get the number of processor cores available to the VM"
Post a Comment