+
+ c = strdup(p);
+ for (int i = 0; i < strlen(c); i++)
+ c[i] = tolower(c[i]);
+
+ if (!strncmp("us", c, 2) || !strncmp("usec", c, 4))
+ mult = 1;
+ else if (!strncmp("ms", c, 2) || !strncmp("msec", c, 4))
+ mult = 1000;
+ else if (!strcmp("s", c))
+ mult = 1000000;
+ else if (!strcmp("m", c))
+ mult = 60 * 1000000UL;
+ else if (!strcmp("h", c))
+ mult = 60 * 60 * 1000000UL;
+ else if (!strcmp("d", c))
+ mult = 24 * 60 * 60 * 1000000UL;
+
+ free(c);
+ return mult;