$$\require{cancel}$$
A second theory of hearing is called the periodicity or temporal theory of hearing. In this theory it is the timing of the firing of nerve impulses that carries information about the perceived pitch. A simple sine wave at $$500\text{ Hz}$$ repeats with a period of $$1/500\text{ Hz} = 0.002\text{ s}$$. The simplest form of the theory says that the vibration causes a nerve to fire every $$0.002\text{ s}$$, sending a signal to the brain that is interpreted as a $$500\text{ Hz}$$ sound. Different sections of a complex sound waveform also repeat periodically. We would expect that hair cells might also fire with the same periodicity of sections of the waveform. For complex waveforms there might be more nerves firing for larger amplitude parts of the wave so that information about the wave shape is also transmitted to the brain.
One difficulty with this theory is that the nerves attached to the hair cells in the cochlea don't seem to fire as often as the theory would predict (and can't fire at a rate of $$20,000\text{ Hz}$$, at the high end of human hearing). For example instead of firing every $$0.002\text{ s}$$ for a $$500\text{ Hz}$$ signal the nerve might initially fire at a period of $$0.002\text{ s}$$ but then skip to $$0.004\text{ s}$$ intervals, $$0.006\text{ s}$$ intervals or some combination of these periods. This could still transmit the correct information, however. The brain could possibly interpret a sequence of $$0.002\text{ s}, 0.004\text{ s}, 0.006\text{ s}$$ firings etc. as multiples of $$0.002$$ and conclude the real signal is $$0.002\text{ s}$$. Another idea is that the nerves in the cochlea itself somehow filter and combine signals to send a message that is read by the brain as the signal for a $$500\text{ Hz}$$ signal. There are two locations of hair cells inside the cochlea. It is possible that impulses from the outer hair cells could affect signals from the inner hair cells in a feedback process to produce some combined signal that has information about frequency and waveform. Alternative schemes explaining how the temporal theory could still work with a nerve firing rate not equal to the period of the signal have been proposed but as yet there is not enough experimental evidence to settle the issue.