PEP 418: clock_precision.py only uses ASCII to avoid UnicodeEncodeError on print()

This commit is contained in:
Victor Stinner 2012-04-17 23:40:47 +02:00
parent dba42c97a3
commit e80b7c5d8b
1 changed files with 1 additions and 1 deletions

View File

@ -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)