I'm running a basic piece of code to get the GPU's temps, but it never finishes running, here is the code:
import java.util.Date;
import java.util.List;
import com.profesorfalken.jsensors.JSensors;
import com.profesorfalken.jsensors.model.components.Components;
import com.profesorfalken.jsensors.model.components.Cpu;
import com.profesorfalken.jsensors.model.components.Gpu;
import com.profesorfalken.jsensors.model.sensors.Temperature;
public class App {
public static void main(String[] args) {
Components components = JSensors.get.components();
List<Gpu> gpus = components.gpus;
if (gpus != null) {
List<Temperature> temps = gpus.get(0).sensors.temperatures;
System.out.println(temps.size());
for (Temperature temp : temps) {
System.out.println(temp.name + ": " + temp.value);
}
}
System.out.println("At the end");
}
}
It prints "At the end", but never stops running.
I'm running a basic piece of code to get the GPU's temps, but it never finishes running, here is the code:
It prints "At the end", but never stops running.