python > datetime > msecを取得する > msec = int(round(time.time() * 1000)) % 1000
動作確認
CentOS 6.5
現在時刻のmsecを取得したい。
参考
http://stackoverflow.com/questions/5998245/get-current-time-in-milliseconds-in-python
151202a.py
import time
for loop in range(0,3):
msec = int(round(time.time() * 1000)) % 1000
print msec
time.sleep(0.1)
結果
[toLearn]$ python 151202a.py
283
384
484
だいたい100msecごとにmsecの値が表示できている。
Author And Source
この問題について(python > datetime > msecを取得する > msec = int(round(time.time() * 1000)) % 1000), 我々は、より多くの情報をここで見つけました https://qiita.com/7of9/items/9a47abf46f937cb543dc著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .