🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
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?
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
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