Files
Wu Clan abcc9d2308 Add sync to async decorator support (#96)
* Add sync to async decorator support

* Update ASyncTranslator to asgiref
2023-06-06 20:13:33 +08:00

23 lines
331 B
Python

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import datetime
import uuid
def get_uuid_str() -> str:
"""
生成uuid
:return: str(uuid)
"""
return str(uuid.uuid4())
def get_current_timestamp() -> float:
"""
生成当前时间戳
:return:
"""
return datetime.datetime.now().timestamp()