PEP 418: clock_precision.py only uses ASCII to avoid UnicodeEncodeError on print()
This commit is contained in:
parent
dba42c97a3
commit
e80b7c5d8b
|
@ -26,7 +26,7 @@ def format_duration(dt):
|
|||
if dt >= 1e-3:
|
||||
return "%.0f ms" % (dt * 1e3)
|
||||
if dt >= 1e-6:
|
||||
return "%.0f µs" % (dt * 1e6)
|
||||
return "%.0f us" % (dt * 1e6)
|
||||
else:
|
||||
return "%.0f ns" % (dt * 1e9)
|
||||
|
||||
|
|
Loading…
Reference in New Issue