I don't understand your question. Are you referring to the gyro module provided in that thread or are you talking about doing your own integration? In any case, integration is done periodically. So the integration must be call once inside the robot main loop. In other words, at the beginning of each loop, the integrator gets called. When you want to read the heading, you just call the gyro module to get the value, you don't need to call the integrator again since it's already done at the beginning of each loop.