Set thread keep alive time.