test.py --time throws TypeError: a float is required

  • Version: master
  • Platform: Windows, Linux x64 (haven't tried others yet)
  • Subsystem: tools

I'm getting an error when using the --time option for test.py:
e.g.,

$ ./tools/test.py --time test/parallel/test-module-loading-globalpaths
[00:02|% 100|+   1|-   0]: Done
--- Total time: 00:02.244 ---
Traceback (most recent call last):
  File "./tools/test.py", line 1760, in <module>
    sys.exit(Main())
  File "./tools/test.py", line 1752, in Main
    t = FormatTime(entry.duration)
  File "./tools/test.py", line 1531, in FormatTime
    millis = round(d * 1000) % 1000
TypeError: a float is required