Last active
December 24, 2017 08:51
-
-
Save clarksun/1bfe31070d750323b56f9f25c63d267a to your computer and use it in GitHub Desktop.
python生成微秒
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frontera hbase backend | |
from time import time | |
random_str = int(time() * 1E+6) # 16位数字, 微秒, microsecond | |
random_str = int(time() * 1E+3) # 13位数字, 毫秒, millisecond |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment