Add timeout to select()