mirror of
https://github.com/systemd/systemd.git
synced 2026-08-03 22:50:29 +00:00
analyze: Add "timespan" command to dump time span in usec
This is useful for a couple of cases, I'm mostly interested in case #1: 1. Verifying "reasonable" values in a trivially scriptable way 2. Debugging unexpected time span parsing directly Test Plan: ``` % build/systemd-analyze timespan 20 Original: 20 μs: 20 Human: 20us % build/systemd-analyze timespan 20ms Original: 20ms μs: 20000 Human: 20ms % build/systemd-analyze timespan 20z Failed to parse time span '20z': Invalid argument ```
This commit is contained in:
committed by
Lennart Poettering
parent
f402ce827d
commit
3f1c1287a9
@@ -367,7 +367,8 @@ const char *special_glyph(SpecialGlyph code) {
|
||||
[BLACK_CIRCLE] = "*",
|
||||
[ARROW] = "->",
|
||||
[MDASH] = "-",
|
||||
[ELLIPSIS] = "..."
|
||||
[ELLIPSIS] = "...",
|
||||
[MU] = "u",
|
||||
},
|
||||
|
||||
/* UTF-8 */
|
||||
@@ -381,6 +382,7 @@ const char *special_glyph(SpecialGlyph code) {
|
||||
[ARROW] = "\342\206\222", /* → */
|
||||
[MDASH] = "\342\200\223", /* – */
|
||||
[ELLIPSIS] = "\342\200\246", /* … */
|
||||
[MU] = "\316\274", /* μ */
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ typedef enum {
|
||||
ARROW,
|
||||
MDASH,
|
||||
ELLIPSIS,
|
||||
MU,
|
||||
_SPECIAL_GLYPH_MAX
|
||||
} SpecialGlyph;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user