Dear Orlan,
eventData parameters are not to be used directly; according to timer control help:
eventData1 is a pointer to a double that represents the current time in seconds. The time base is the same as that used by the Timer function in the Utility Library. eventData2 is a pointer to a double that represents the time that has elapsed since the last call to the timer callback. LabWindows/CVI sets the elapsed time to zero if the callback has not been called previously. You can cast these pointers to the corresponding double values by using
tn = *(double *)eventData2;
obtaining values in seconds: eventData1 is directly comparable with the Timer () function, while eventData2 gives the same result than using inside the timer callback
{
static double told = 0.0;
double tnew;
tnew = *(double *)eventData2;
tn = tnew - told;
told = tnew;
}
Now, from my experience, eventData2 wraps at 1193 hours and some (the same as Timer() function), while eventData1 doesn't; this is quite in line with this
KB entry. Seems that both eventData2 and Timer() function rely on a 32bit-wide counter so wrapping at this particular value, while eventData1 is based on a larger counter (how large? I don't know: I never have let a computer on for such a long time!
😉 )
Message Edited by Roberto Bozzolo on 06-22-2005 08:56 AM