snippetpythonCriticalCanonical
How do I get the current time in milliseconds in Python?
Viewed 0 times
howmillisecondstimethecurrentpythonget
Problem
How do I get the current time in milliseconds in Python?
Solution
Using
Then:
time.time():import time
def current_milli_time():
return round(time.time() * 1000)Then:
>>> current_milli_time()
1378761833768Code Snippets
import time
def current_milli_time():
return round(time.time() * 1000)>>> current_milli_time()
1378761833768Context
Stack Overflow Q#5998245, score: 1032
Revisions (0)
No revisions yet.