mirror of
https://github.com/aclist/dztui.git
synced 2026-10-31 15:12:48 +01:00
feat: dzgui 7 alpha
This commit is contained in:
1 parent
1acdbd58c5
commit
2e5b771137
150 files changed
+10359
No files matched your search
@@ -0,0 +1,17 @@
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
|
||||
def get_time() -> int:
|
||||
return int(datetime.now().timestamp())
|
||||
|
||||
# TODO: deprecated
|
||||
#def write_time(path: Path) -> None:
|
||||
# time = get_time()
|
||||
# Path.write_text(str(time))
|
||||
|
||||
def is_elapsed(time_before: int) -> bool:
|
||||
time_now = get_time()
|
||||
if time_now - time_before <= 30:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
Reference in new issue
Block a user