| | |
How to get total time of running program
![]() |
1) we don't do your homework for you, show some effort
2) we're certainly not going to let you order us around to do it "asap". If and when we do anything it'll be at a time and place of our choosing, not yours, suggesting anything else makes us LESS eager to help you.
3) (general warning) it's NOT "urgent" to anyone except possibly you, and if it is you should have started sooner.
4) properly define your problem domain. WHAT do you want to measure exactly? What that is defines where and how to measure it.
2) we're certainly not going to let you order us around to do it "asap". If and when we do anything it'll be at a time and place of our choosing, not yours, suggesting anything else makes us LESS eager to help you.
3) (general warning) it's NOT "urgent" to anyone except possibly you, and if it is you should have started sooner.
4) properly define your problem domain. WHAT do you want to measure exactly? What that is defines where and how to measure it.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
•
•
Join Date: Oct 2007
Posts: 39
Reputation:
Solved Threads: 0
can someone teach me how to get the running time of this program? thank you very much!
Java Syntax (Toggle Plain Text)
import java.io.*; public class ArrauSample { public static void main(String args[]){ BufferedReader console = new BufferedReader(new InputStreamReader(System.in)); int x=0; int max= 5; int myNum[] = new int[max]; String myString[] = new String[max]; try{ for(x=0; x<max; x++) { System.out.println("Input element #" + (x+1)); myString[x]=console.readLine(); } }catch(IOException e){} for(x=0; x<max; x++) { System.out.print("Element #" + (x+1)); System.out.println(myString[x]); } } }
•
•
Join Date: Oct 2007
Posts: 55
Reputation:
Solved Threads: 5
Well the basic way of getting time in a program is to use
long x = System.getCurrentTime();
which returns the current time of the computer in milliseconds.
Anyone with a brain could figure it out from there! :p
long x = System.getCurrentTime();
which returns the current time of the computer in milliseconds.
Anyone with a brain could figure it out from there! :p
•
•
Join Date: Nov 2006
Posts: 224
Reputation:
Solved Threads: 31
•
•
•
•
Well the basic way of getting time in a program is to use
long x = System.getCurrentTime();
which returns the current time of the computer in milliseconds.
Anyone with a brain could figure it out from there! :p
perhaps you are thinking of System.currentTimeMillis()
--
Index of mp3
Index of mp3
![]() |
Similar Threads
- Get video file total time of playing using php (PHP)
- Time display program (C++)
- Running a program (C++)
- Help with a Time Keeping Program (Computer Science)
Other Threads in the Java Forum
- Previous Thread: query
- Next Thread: j2me textfield password
| Thread Tools | Search this Thread |
addball android applet application apps array automation awt bidirectional binary birt bluetooth businessintelligence busy_handler(null) button card class classes client code collision columns component constructor crashcourse css database designadrawingapplicationusingjavajslider draw eclipse ee error eventlistener exception expand fractal free game givemetehcodez graphics gui guidancer html ide image integration intellij j2me java javaarraylist javadoc javafx javamicroeditionuseofmotionsensor javaprojects jme jni jpanel jtree julia jvm linux loan loop method migrate mobile mobiledevelopmentcreatejar myaggfun netbeans newbie oracle phone physics plazmic print problem program programming project radio scanner server service set sharepoint smart sms smsspam software sql subclass support swing textfield threads tree trolltech unlimited utility windows






