14,954
edits
(+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 == | ||