Timer: Difference between revisions

Jump to navigation Jump to search
248 bytes added ,  8 April 2018
no edit summary
(+dos)
No edit summary
Line 55: Line 55:


== Python ==
== Python ==
[http://stackoverflow.com/questions/7370801/measure-time-elapsed-in-python performance - Measure time elapsed in Python? - Stack Overflow]
Using [https://docs.python.org/3/library/time.html#time.time time.time()]<ref>[http://stackoverflow.com/questions/7370801/measure-time-elapsed-in-python performance - Measure time elapsed in Python? - Stack Overflow]</ref>
<pre>
import time
 
# start the timer
start = time.time()
 
# do something
 
# stop the timer
end = time.time()
print("Elapsed time in seconds: ", end - start)
</pre>


== Java ==
== Java ==

Navigation menu