I need to generate pulses on one of the lines of my DIO-96, which doesn't have the pulse generating API available to it that some of the analog instruments do. I don't own Labview Realtime so I have to do it myself in C++. The method I've heard to use is to perform some standard mathematical operation in a loop many times and then time it to obtain an approximate value on the time needed to perform that operation-- Then simply use that operation as the basis for a timer by repeatedly invoking it in a loop. I was going to use arctangent in Visual C++, but if I just do something like arctan(1) is there a danger the compiler will cache the result and that that will skew the timing? Would it be better to gener
ate a random number each time and then perform arctangent on that? Or is there a better trick available? The Microsoft C++ libraries have a process timer function called clock and a few others, but these are not even precise enough for time intervals measured in milliseconds,much less microseconds. any tips appreciated.
brendan