Hi all, i have to catch the information of cpu and the class CpuInfo in the examples do it.Well i have to prelevate the information of cpu and i do this code:
String a=CpuPerc.format(cpu.getUser());
String b=CpuPerc.format(cpu.getSys());
String c=CpuPerc.format(cpu.getIdle());
but now i want to convert this string in float because i want to sum all together and than divide.
I try whit float.Integerfloat; float.valueof; and nothing i try to to delete % into the string with replace('%',' ') but whit no result.
How can i do it?
Please Help me
P.S. Sorry for my english
|