One simple way would be to check the time in every loop cycle and only acquire data when the time differential reaches 3 seconds. I have attached an example which shows how to do the timing this way and shows where to put your data acquisition. This is a very simplified diagram which is intended only to show you the concept. If this isn't what you need then I would suggest that you post a more detailed description of what you are trying to do.