Okay, well just to get started, take a glance over at the thread over at
http://www.chiefdelphi.com/forums/sh...ad.php?t=75273 to get an idea how to start.
Or, you can just take the attached vi and modify it yourself. It's pretty messy as it is, but it has the basic framework you need. All you need to do is change the case statement to x..y where x and y are the start and end time in ms (0..15000 means 0-15 s), then put what you want to do in the cases.
While the attached should be functional, I strongly recommend looking over it until you understand it. I'm not saying don't use it, but you
need to understand (or at least think you understand) exactly what is going into your code.