Fix use of timetools.
This commit is contained in:
parent
db37519f63
commit
cfffed81b4
1 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue