Dependence of the energy resolution of a scintillating crystal on the readout integration time