public static HBaseProtos.TimeUnit toProtoTimeUnit(final TimeUnit timeUnit) {
    switch (timeUnit) {
      case NANOSECONDS:
        return HBaseProtos.TimeUnit.NANOSECONDS;
      case MICROSECONDS:
        return HBaseProtos.TimeUnit.MICROSECONDS;
      case MILLISECONDS:
        return HBaseProtos.TimeUnit.MILLISECONDS;
      case SECONDS:
        return HBaseProtos.TimeUnit.SECONDS;
      case MINUTES:
        return HBaseProtos.TimeUnit.MINUTES;
      case HOURS:
        return HBaseProtos.TimeUnit.HOURS;
      case DAYS:
        return HBaseProtos.TimeUnit.DAYS;
    }
    throw new RuntimeException("Invalid TimeUnit " + timeUnit);
  }
Convert a client TimeUnit to a protocol buffer TimeUnit
@return the converted protocol buffer TimeUnit
hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java