The commit which added those was pushed prematurely before anyone could object
to illogical suffixes like just m for milliseconds. Without this, we'd be locked
into never being able to implement the "m" suffix for minutes.
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
if (duration) {
t = dt.tm_hour * 3600 + dt.tm_min * 60 + dt.tm_sec;
- if (*q == 'm') {
+ if (q[0] == 'm' && q[1] == 's') {
suffix = 1000;
microseconds /= 1000;
- q++;
+ q += 2;
} else if (*q == 'u') {
suffix = 1;
microseconds = 0;