rem: long double processed; uint64 total; char lastChar; bool invalidChars = false; bool microseconds = false; bool milliseconds = false; int i, length;  length = strlen(fromString); lastChar = fromString[length - 1];  processed = atol(fromString);  if ( processed > INT_MAX ) processed = INT_MAX;  if ( processed == 0 ) {
add: bigtime_t microSeconds=0; bool endOfString=false; int i=0; while (i<20 && !endOfString) switch (fromString[i++]) { case '0': microSeconds*=10;break; case '1': microSeconds=10*microSeconds+1;break; case '2': microSeconds=10*microSeconds+2;break; case '3': microSeconds=10*microSeconds+3;break; case '4': microSeconds=10*microSeconds+4;break; case '5': microSeconds=10*microSeconds+5;break; case '6': microSeconds=10*microSeconds+6;break; case '7': microSeconds=10*microSeconds+7;break; case '8': microSeconds=10*microSeconds+8;break; case '9': microSeconds=10*microSeconds+9;break; case 'u': case 'U': endOfString=true; break; case 'i': case 'I': microSeconds*=1000; endOfString=true;break; case 's': case 'S': case '\0': microSeconds*=microsPerSecond; endOfString=true; break; case 'm': case 'M': microSeconds*= (60*microsPerSecond);endOfString=true; break; case 'h': case 'H': microSeconds*= (3600*microsPerSecond);endOfString=true; break; case 'd': case 'D': microSeconds*= (86400*microsPerSecond);endOfString=true; break; } if (fromString[i-1]!='\0' && fromString[i]!='\0')
context: process_arg(char *fromString){	long double processed;	uint64 total;	char lastChar;	bool invalidChars = false;	bool microseconds = false;	bool milliseconds = false;	int i, length;	length = strlen(fromString);	lastChar = fromString[length - 1];	processed = atol(fromString);	if ( processed > INT_MAX )		processed = INT_MAX;		if ( processed == 0 ) {		warn_invalid(fromString);		suggest_help();		exit(1);	}		switch(lastChar) {		case 'u':		case 'U':			microseconds = true;			break;		case 'i':		case 'I':			milliseconds = true;			break;		case 's':		case 'S':			break;		case 'm':		case 'M':			processed *= 60;			break;		case 'h':		case 'H':			processed *= 3600;			break;		case 'd':		case 'D':			processed *= 86400;			break;		default: {			for (i=0; i < length; i++) {				if (! (fromString[i] >= '0' && fromString[i] <= '9'))					invalidChars = true;			}			if (invalidChars) {				warn_invalid(fromString);				suggest_help();				exit(1);			}		}	}	total = (uint64) processed;	if (microseconds)		total *= 1;	else if (milliseconds)		total *= 1000;	else		total *= 1000000;	if (total > UINT64_MAX ) {		total = UINT64_MAX;	}	return(total);}