the interval between the last data packet sent and…

$cat /proc/sys/net/ipv4/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 :
linux/net/ipv4/tcp.c - 8 identical
   3100:   * TCP Keep-Alives (
   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 - 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.