Mark,
I think the easiest approach would be to simply implement a software counter. Inside of a loop, check each point in the waveform and test whether it has maintained the threshold. If it has, then add one to the count, and if not, reset the count to zero. When the count reaches the appropriate multiple of the waveform's dt (to equal 25ms), then you can quit the loop and return the information.
Regards,
E. Sulzer
Applications Engineer
National Instruments