Hi, I was wondering how would you see how long a program has been running? I've tried looking in the calendar class, but I cant seem to get it to work. Do you guys have any ideas?
posted 13 years ago
just start a new timer at the start of program execution with the statement: long startTime = System.currentTimeMillis(); at the end of the program, get the current time by : long endTime = System.currentTimeMillis(); you can then get the execution time in milliseconds which (im sorry, you have to manually convert into an appropriate format) hope this helps
If quitters never win, and winners never cheat, who's the idiot that said: Quit while you're ahead?