Quantcast
Channel: User motagirl2 - Stack Overflow
Viewing all articles
Browse latest Browse all 22

Answer by motagirl2 for How do I get the current time?

$
0
0

If you just want the current timestamp in ms (for example, to measure execution time), you can also use the "timeit" module:

import timeitstart_time = timeit.default_timer()do_stuff_you_want_to_measure()end_time = timeit.default_timer()print("Elapsed time: {}".format(end_time - start_time))

Viewing all articles
Browse latest Browse all 22

Latest Images

Trending Articles





Latest Images