Converts strings like '1s' or '1h' into a miliseconds