They are both important. Exposure to noise levels above 130dB are dangerous even for one second and exposure to noise above 140dB causes pain. Certain types of impact noise are therefore dangerous in themselves. The amount of time spent in a noisy environment is the other major factor in whether it is dangerous or not. Noise is described in terms of a decibel scale. In simple terms, the amount of sound doubles every 6dB and is subjectively twice as loud with every 10dB increase. Consequently, every 3db increase in sound level halves the amount of time that exposure to that level is safe.
That also means every 3dB extra protection doubles the amount of time exposure to a level is safe.