Advertisement

Get Processor Speed in Java

Started by September 03, 2000 01:08 PM
1 comment, last by nitro123 24 years, 2 months ago
How do I get the processor speed? Do I have to run a thread and see how fast it executes and calculate the delay? is their a java method I can use to get the processor speed?
Bob Jones
int getCurrentTime()

forget which lib it lives in, and it''s a little inaccurate in winnt

of course, i assume that you are after timing execution of a java proggie
Advertisement
um... actually:

long timer = System.currentTimeMillis();

/* rest of program execution */

System.out.println((System.currentTimeMillis() - timer));

Then again, you can take a look at the Big "O" stuff that we''re getting crammed with...

:-)

This topic is closed to new replies.

Advertisement