Fix use of timetools.

This commit is contained in:
voussoir 2022-11-19 22:42:50 -08:00
parent db37519f63
commit cfffed81b4

View file

@ -16,6 +16,7 @@ from voussoirkit import hms
from voussoirkit import imagetools from voussoirkit import imagetools
from voussoirkit import pathclass from voussoirkit import pathclass
from voussoirkit import stringtools from voussoirkit import stringtools
from voussoirkit import timetools
from . import constants from . import constants
from . import exceptions from . import exceptions
@ -348,12 +349,12 @@ def parse_unit_string(s) -> typing.Union[int, float, None]:
return float(s) return float(s)
if s == 'now': if s == 'now':
return now().timestamp() return timetools.now().timestamp()
nowdelta = re.search(r'now((?:\+|-)\d+(?:\.\d*)?)', s) nowdelta = re.search(r'now((?:\+|-)\d+(?:\.\d*)?)', s)
if nowdelta: if nowdelta:
nowdelta = nowdelta.group(1) nowdelta = nowdelta.group(1)
return now().timestamp() + float(nowdelta) return timetools.now().timestamp() + float(nowdelta)
return bytestring.parsebytes(s) return bytestring.parsebytes(s)