Timer: Difference between revisions

Jump to navigation Jump to search
322 bytes added ,  2 March 2018
no edit summary
No edit summary
Line 34: Line 34:
[http://stackoverflow.com/questions/7370801/measure-time-elapsed-in-python performance - Measure time elapsed in Python? - Stack Overflow]
[http://stackoverflow.com/questions/7370801/measure-time-elapsed-in-python performance - Measure time elapsed in Python? - Stack Overflow]


== Java ==
[https://docs.oracle.com/javase/7/docs/api/java/lang/System.html#currentTimeMillis() Java.lang.System.currentTimeMillis()]
<pre>
# start the timer
long start_time = System.currentTimeMillis();
# stop the timer
System.out.println("\nElapsed time: " + (System.currentTimeMillis() - start_time) + " ms");
</pre>


References
References

Navigation menu