code: protected int getCurrentTime() {
          try {
              return org.keycloak.common.util.Time.currentTime();
          } catch (Throwable e) {
              try {
                  Class<?> tc = Class.forName("org.keycloak.util.Time"); //$NON-NLS-1$
                  Method method = tc.getMethod("currentTime"); //$NON-NLS-1$
                  Object object = method.invoke(null);
                  return (Integer) object;
              } catch (Throwable e1) {
                  return (int) (System.currentTimeMillis() / 1000);
              }
          }
      }
docs: This method looks strange - it is designed to support both newer and older
  versions of keycloak.  The {@link Time} class was repackaged, so to support
  older versions of keycloak we will try to fall back to loading an older
  version of the {@link Time} class.
  @return the current time