For Programmers: Free Programming Magazines  


Home > Archive > Java Help > September 2004 > Timing Methods









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Timing Methods
jascas

2004-09-22, 9:10 am

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

Andrew Thompson

2004-09-22, 9:10 am

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

> 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...#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.

>..(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
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com