-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
Hi there
It would be nice to add milliseconds support to this tool
I was able to do that at runtime by overriding some internal values with the following code part:
import re
from pytimeparse import timeparse
timeparse.MILLIS = r'(?P<millis>[\d.]+)\s*(?:ms|msecs?|millis|milliseconds?)'
timeparse.TIMEFORMATS[0] += r'\s*' + timeparse.OPT(timeparse.MILLIS)
timeparse.MULTIPLIERS['millis'] = 1e-3
timeparse.COMPILED_TIMEFORMATS[0] = re.compile(r'\s*' + timeparse.TIMEFORMATS[0] + r'\s*$', re.I)
o-alexandre-felipe, bbstilson and kellymtrinh
Metadata
Metadata
Assignees
Labels
No labels