From: Uwe Hermann Date: Sun, 26 Apr 2015 15:53:24 +0000 (+0200) Subject: timing: Shorten annotations (time units). X-Git-Tag: libsigrokdecode-0.4.0~114 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=468c974e7bdbc068ad1771069e3e0adb35853ad5;p=libsigrokdecode.git timing: Shorten annotations (time units). --- diff --git a/decoders/timing/pd.py b/decoders/timing/pd.py index 5cb162f..6bca120 100644 --- a/decoders/timing/pd.py +++ b/decoders/timing/pd.py @@ -26,13 +26,13 @@ class SamplerateError(Exception): def normalize_time(t): if t >= 1.0: - return '%.3f sec' % t + return '%.3f s' % t elif t >= 0.001: - return '%.3f msec' % (t * 1000.0) + return '%.3f ms' % (t * 1000.0) elif t >= 0.000001: - return '%.3f usec' % (t * 1000.0 * 1000.0) + return '%.3f μs' % (t * 1000.0 * 1000.0) elif t >= 0.000000001: - return '%.3f nsec' % (t * 1000.0 * 1000.0 * 1000.0) + return '%.3f ns' % (t * 1000.0 * 1000.0 * 1000.0) else: return '%f' % t