There really isn't a lot of information in your post. Since you are not charged by the word, why can't you provide something other than a single sentence to really describe your problem?
The most simple answer is that if you have a loop, use the functions on the Timing palette to stop the loop. The Elapsed Time function works well.