AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Timing Methods

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
jascas
Guest





PostPosted: Wed Sep 22, 2004 12:11 pm    Post subject: Timing Methods Reply with quote



I am trying to find out how long it would take for a method to run in
miniseconds(Timing Methods) and then write the result to file. Please can
you help me. Thanks

Back to top
Andrew Thompson
Guest





PostPosted: Wed Sep 22, 2004 12:35 pm    Post subject: Re: Timing Methods Reply with quote



On Wed, 22 Sep 2004 08:11:52 -0400, jascas wrote:

Quote:
I am trying to find out how long it would take for a method to run in
miniseconds

That is 'milliseconds'. Look at the JavaDocs for currentTimeMillis()
<http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#method_summary>

Note that this is of little practical use.

A lot of factors go into how long a method takes to run.

These including the VM (how aggressively it optimizes bytecodes)
how long the test is run (improves with time) and how much
time the underlying OS devotes to the Java threads.

Quote:
..(Timing Methods) and then write the result to file.

<http://mindprod.com/fileio.html>

HTH

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.lensescapes.com/ Images that escape the mundane

Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.