I have an object that has some cpu stats. The problem is that those that's are in type long
(i think)
How can I convert this to usefull values like float
and int
?
I tried to cast it but I got
java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Float
float value = (float) Docker.getStatistics("ENVX").getCpuStats().get("system_cpu_usage");