alarm[1] = time alarm[2] = rate