parseDuration
public static long parseDuration(String durationStr)
Parses a duration String to its long value.
Frequency string consists of a number followed by an unit, with 's' for seconds, 'm' for minutes, 'h' for hours
and 'd' for days. For example, an input of '5m' means 5 minutes which will be parsed to 300000 milliseconds.
- Parameters:
durationStr - the duration string (ex: 5m, 5h etc).
- Returns:
- long which is milliseconds equivalent of the duration string