cache note arc points, untruncate time

This commit is contained in:
Anthony Samms
2026-01-15 15:15:19 -05:00
parent f62201dbb5
commit 0c9645bda7
3 changed files with 20 additions and 20 deletions

View File

@@ -3,17 +3,8 @@ from typing import Any, Optional
from libs.global_data import global_data
def rounded(num: float) -> int:
sign = 1 if (num >= 0) else -1
num = abs(num)
result = int(num)
if (num - result >= 0.5):
result += 1
return sign * result
def get_current_ms() -> int:
return rounded(time.time() * 1000)
def get_current_ms() -> float:
return time.time() * 1000
class BaseAnimation():

View File

@@ -40,9 +40,9 @@ def rounded(num: float) -> int:
result += 1
return sign * result
def get_current_ms() -> int:
def get_current_ms() -> float:
"""Get the current time in milliseconds"""
return rounded(time.time() * 1000)
return time.time() * 1000
def strip_comments(code: str) -> str:
"""Strip comments from a string of code"""