class ConnectionPool::TimedStack

def idle_connections?(idle_seconds)

Returns true if the first connection in the stack has been idle for more than idle_seconds

This is an extension point for TimedStack and is called with a mutex.
#
def idle_connections?(idle_seconds)
  connection_stored? && (current_time - @que.first.last > idle_seconds)
end