class ParsingUtils {

  public static long parse(
      final String val,
      final TimeUnit unit)
      throws ParseException {
    long time = convertToTime(val);
    return unit.convert(time, TimeUnit.MICROSECONDS);
  }

}