An integrate-and-fire model for pulsatility in the neuroendocrine system.