Influence of cooling time on the internal energy of ions subjected to resonance excitation in a quadrupole ion trap