Possible Duplicate:
Detect CPU Speed/Memory/Internet Speed using Java?
I am a beginner and I want to learn how to write Java programs for Android apps. Thinking that it would not be too difficult I thought of writing a benchmark utility.
I have spent two days solid looking through a host of tutorials and I'm no nearer my goal, in fact I think that I'm more confused. The more I read the more I struggle to understand. Maybe I should take up knitting?
How do I ask the processor what speed it's running at? If I write code (currentTimeMillis or nanoTime) how do I know that the processor is only doing what I've asked it to do?
How do I use bogoMIPS? To have access to it's information or implement it into my code. I've read /proc/cpuinfo but how do I get it's source code to implement into my own code? Or, how do I implement it into my code (but I don't know how it works, so I don't really know what the results mean.
I guess that's the bottom line question: how do I write the basic code to get the processors speed (in GB's), so that what it gives me is exactly what I am asking it. How do I control the processor so that it does what I want (in terms of calculating the speed)?
Do I simply say "processor do this calculation and nothing else, so that I know how fast you're running"?
I've followed various tutorials on Java over the past few weeks, but I'm still blank on this.