src/main/java/org/jivesoftware/smack/keepalive/KeepAliveManager.java
public void setPingInterval(long newPingInterval) {
        if (pingInterval == newPingInterval)
            return;

        // Enable the executor service
        if (newPingInterval > 0)
            enableExecutorService();

        pingInterval = newPingInterval;

        if (pingInterval < 0) {
            stopPinging();
        } else {
            schedulePingServerTask();
        }
    }
public void setPingInterval(long newPingInterval) {
        if (pingInterval == newPingInterval)
            return;

        // Enable the executor service
        if (newPingInterval > 0)
            enableExecutorService();

        pingInterval = newPingInterval;

        if (pingInterval < 0) {
            stopPinging();
        } else {
            schedulePingServerTask();
        }
    }
Sets the ping interval.

@param pingInterval
The new ping time interval in milliseconds.