Get Processor Speed in Java
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
September 03, 2000 06:32 PM
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
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
September 04, 2000 02:14 AM
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...
:-)
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
Popular Topics
Advertisement