Files
DynaNote/timer.py
2025-11-14 13:39:43 +08:00

12 lines
302 B
Python

import time
def get_daystamp() -> int:
"""获取当前日戳(以天为单位的整数时间戳)"""
return int((time.time() + 8 * 3600) // (24 * 3600))
def get_timestamp() -> float:
"""获取 UNIX 时间戳"""
# 搞这个类的原因是要支持可复现操作
return time.time()