private static int readRegistryTimeoutValue() {
    int targetTimeout = DEFAULT_TIMEOUT_MS;
    try {
      targetTimeout = Advapi32Util.registryGetIntValue(WinReg.HKEY_CURRENT_USER, "Control Panel\\Desktop", "ForegroundLockTimeout");
      if (LOG.isDebugEnabled()) {
        LOG.debug("ForegroundLockTimeout read from registry: " + targetTimeout);
      }
    }
    catch (Exception e) {
      LOG.warn("Error getting ForegroundLockTimeout from registry, assuming default value of " + targetTimeout, e);
    }
    return targetTimeout;
  }
private static int readRegistryTimeoutValue()