Seite 1 von 1
Java Programmlaufzeit
Verfasst: 10.11.2003 16:31
von BrahmA
Tach Leute....
Kann mir mal einer sagen wie ich die Programmlaufzeit bestimmen kann? In einem Programm? Oder hat jemand einen guten link? DAnke...

Verfasst: 10.11.2003 19:52
von cyrus
Ich nehme aufgrund deines tux userpics mal an das du Linux benutzt. Da gibts das Kommando time (siehe man time).
Aufruf:
time <program>
z.B:
time sleep 1
(braucht auf meinem System 1.005s

)
Ich glaube time ist sogar n bash bzw. tcsh internes Kommando, zumindest kann ich kein time binary auf meinem System finden...
Verfasst: 10.11.2003 19:52
von Pyramide
Javadoc Thread hat geschrieben:The Java Virtual Machine continues to execute threads until either of the following occurs:
- The exit method of class Runtime has been called and the security manager has permitted the exit operation to take place.
- All threads that are not daemon threads have died, either by returning from the call to the run method or by throwing an exception that propagates beyond the run method.
Verfasst: 12.11.2003 18:38
von BrahmA
Danke erstmal, werde mal deinen Link antesten Pyramide!
Dir auch Danke Cyrus, aber das ganze soll ins java-programm integriert werden, nicht über die shell laufen.....
