diff --git a/testing/mozbase/mozlog/mozlog/structured/formatters/machformatter.py b/testing/mozbase/mozlog/mozlog/structured/formatters/machformatter.py index d2280b258d6..3fcca69a466 100644 --- a/testing/mozbase/mozlog/mozlog/structured/formatters/machformatter.py +++ b/testing/mozbase/mozlog/mozlog/structured/formatters/machformatter.py @@ -17,6 +17,7 @@ class BaseMachFormatter(base.BaseFormatter): def __init__(self, start_time=None, write_interval=False, write_times=True): if start_time is None: start_time = time.time() + start_time = int(start_time * 1000) self.start_time = start_time self.write_interval = write_interval self.write_times = write_times @@ -89,14 +90,14 @@ class BaseMachFormatter(base.BaseFormatter): return self.status_buffer.get(test, {"count": 0, "unexpected": 0, "pass": 0}) def _time(self, data): - entry_time = (data["time"] / 1000) + entry_time = data["time"] if self.write_interval and self.last_time is not None: t = entry_time - self.last_time self.last_time = entry_time else: t = entry_time - self.start_time - return t + return t / 1000. class MachFormatter(BaseMachFormatter):