code: public static String durationToN1qlFormat(long duration, TimeUnit unit) {
          switch (unit) {
              case NANOSECONDS:
                  return duration + "ns";
              case MICROSECONDS:
                  return duration + "us";
              case MILLISECONDS:
                  return duration + "ms";
              case SECONDS:
                  return duration + "s";
              case MINUTES:
                  return duration + "m";
              case HOURS:
                  return duration + "h";
              case DAYS:
              default:
                  return unit.toHours(duration) + "h";
          }
      }
docs: Helper method to convert a duration into the n1ql (golang) format.