Simple fix for time elapsed (#94)

This commit is contained in:
WilliamWsyHK 2024-05-15 23:04:32 +08:00 committed by GitHub
parent 9e395ffa10
commit 95971e5359
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -556,7 +556,7 @@ class LogAnalyser:
case _:
raise NotImplementedError(common_error)
timestamp_regex = re.compile(r"\d{2}:\d{2}:\d{2}\.\d{3}")
timestamp_regex = re.compile(r"(\d{2}:\d{2}:\d{2}\.\d{3})\s+?\|")
latest_timestamp = re.findall(timestamp_regex, self._log_text)[-1]
if latest_timestamp:
timestamp_message = f" Time elapsed: `{latest_timestamp}`"