tools: fix test.py --time
PR-URL: https://github.com/nodejs/node/pull/27007 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
5583d4d73e
commit
8bfce89926
@ -1511,7 +1511,7 @@ def FormatTime(d):
|
||||
|
||||
|
||||
def FormatTimedelta(td):
|
||||
if hasattr(td.total, 'total_seconds'):
|
||||
if hasattr(td, 'total_seconds'):
|
||||
d = td.total_seconds()
|
||||
else: # python2.6 compat
|
||||
d = td.seconds + (td.microseconds / 10.0**6)
|
||||
|
Loading…
x
Reference in New Issue
Block a user