Skip to content

Instantly share code, notes, and snippets.

@clarksun
Last active December 24, 2017 08:51
Show Gist options
  • Save clarksun/1bfe31070d750323b56f9f25c63d267a to your computer and use it in GitHub Desktop.
Save clarksun/1bfe31070d750323b56f9f25c63d267a to your computer and use it in GitHub Desktop.
python生成微秒
# 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