the interval between the last data packet sent and…

$cat /proc/sys/net/ipv4/tcp_keepalive_time
7200
$
tcp_keepalive_time
the interval between the last data packet sent
 (simple ACKs are not considered data) and the first keepalive probe;
 after the connection is marked to need keepalive, this counter is not used any further

source :http://tldp.org/HOWTO/TCP-Keepalive-HOWTO/usingkeepalive.html
linux/net/ipv4/tcp.c - 8 identical
   3100:   * TCP Keep-Alives (4.2.3.6)
   366:   *   MAY provide keep-alives. (does)
   367:   *   MUST make keep-alives configurable on a per-connection basis. (does)
  1863:   *      problem with TCP as specified in that the other end could
  1864:   *      keep a socket open forever with no application left this end.
  18100:   *      We use a 3 minute timeout (about the same as BSD) then kill
ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.0.tar.bz2 - GPL - C -
The TCP specification states that if keep-alive is provided, by default
keep-alivemust be turned off and the threshold time before which a
 keep-alive is sent must be 7200 seconds or more (inter keep-alive time
 should also be 7200 seconds).


source : Research Related Paper.
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.55.4690&rep=rep1&type=pdf