Parses a duration string and returns the duration in ms