private static long toMillis(String value, TimeUnit unit) {
		if(value != null && !value.isEmpty()) {
			Matcher matcher = Pattern.compile("[0-9]+").matcher(value);
			if(!matcher.find())
				return 0;
			return unit.toMillis(Integer.parseInt(matcher.group()));
		}
		return 0;
	}