The little i in the bottom corner of your while loop is a loop counter.
If you put a tick count outside your loop and one inside, one subtracted from the other will give the number of ms your program has been running. (divide by 100 to get seconds)
Simply divide your loop counter by your tick counter and attach an indicator = number of samples per second !
ddanskin@slb.com if you need more help.