diff options
Diffstat (limited to 'python/mach/mach/test/zero_microseconds.py')
-rw-r--r-- | python/mach/mach/test/zero_microseconds.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/python/mach/mach/test/zero_microseconds.py b/python/mach/mach/test/zero_microseconds.py new file mode 100644 index 0000000000..1854747bb6 --- /dev/null +++ b/python/mach/mach/test/zero_microseconds.py @@ -0,0 +1,14 @@ +# This code is loaded via `mach python --exec-file`, so it runs in the scope of +# the `mach python` command. +from __future__ import absolute_import + +old = self._mach_context.post_dispatch_handler # noqa: F821 + + +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 # noqa: F821 |