From 8f89cf7c426de33660e8350084bad845cbc47d17 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 6 Dec 2016 10:51:26 +0100 Subject: [PATCH] =?utf8?q?time-util:=20accept=20"=C2=B5s"=20as=20time=20un?= =?utf8?q?it,=20in=20addition=20to=20"us"=20(#4836)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Let's accept "µs" as alternative time unit for microseconds. We already accept "us" and "usec" for them, lets extend on this and accept the proper scientific unit specification too. We will never output this as time unit, but it's fine to accept it, after all we are pretty permissive with time units already. --- src/basic/time-util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/basic/time-util.c b/src/basic/time-util.c index 7ee048425..467503c1b 100644 --- a/src/basic/time-util.c +++ b/src/basic/time-util.c @@ -897,6 +897,7 @@ static char* extract_multiplier(char *p, usec_t *multiplier) { { "y", USEC_PER_YEAR }, { "usec", 1ULL }, { "us", 1ULL }, + { "µs", 1ULL }, }; unsigned i; @@ -1031,6 +1032,7 @@ int parse_nsec(const char *t, nsec_t *nsec) { { "y", NSEC_PER_YEAR }, { "usec", NSEC_PER_USEC }, { "us", NSEC_PER_USEC }, + { "µs", NSEC_PER_USEC }, { "nsec", 1ULL }, { "ns", 1ULL }, { "", 1ULL }, /* default is nsec */ -- 2.30.2