particles emitter loop

I am making a particle emitter that turn on and after a few seconds turns off… but I don’t know how to repeat this action. Want I what is to make the emitter go on and off and then after a few seconds repeat this action… How do I do this??.. I really don’t know.

float time = 0.0f; //Time aggregate variable
float toggle_time = 10.0f; //Time between toggling particles

function Update(){
time += Time.deltaTime;
if(time > toggle_time){
  particleEmitter.enabled = !particleEmitter.enabled; //Toggle
  time = 0.0f; //Reset the timer