A Counter Program

I have a counter program that can send data to PushingBox and then to Google Sheets. However I need to have a time limit of 60 seconds for the counting. Can anyone please tell me what are the ways to set a time limit?
Thank you.

Thank you! It helped me out a lot!

Look at the Blink Without Delay example to see how it manages time. Basically, you need a couple of variables to hold a start time and an interval. When you start your activity, set the start time equal to millis(). Every pass through the loop, check to see if it has been longer than the interval since then using the method from Blink Without Delay. Once the interval has passed, stop running your activity.

I've never seen a better (and briefer) explanation of what "blink without delay" is for and what is the main point to program something similar.

Congratulations.

Regards

P.S. As we say in spanish "lo breve, si bueno, dos veces bueno" (A brief explanation if it is good at the same time, is good twice)