1
0
Fork 0
firefox/python/mach/mach/test/zero_microseconds.py
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

16 lines
515 B
Python

# Make flake8, ruff and autodoc happy
if "self" not in globals():
self = None
# This code is loaded via `mach python --exec-file`, so it runs in the scope of
# the `mach python` command.
old = self._mach_context.post_dispatch_handler
def handler(context, handler, instance, result, start_time, end_time, depth, args):
global old
# Round off sub-second precision.
old(context, handler, instance, result, int(start_time), end_time, depth, args)
self._mach_context.post_dispatch_handler = handler