When I click a button, I create a timer like:
Timer_Id = NewAsyncTimer(0.1, -1, 0, TimerFunc, 0);
Now in TimerFunc, I use EventData1 param which is
if (Event == EVENT_TIMER_TICK) {
if ((double*)EventData1)
currentTime = *((double*)EventData1);
From help, eventData1 is a pointer to a double that represents the current
time in seconds and is relative to the start of the first timer event.
After some time, I destroy my timer with
DiscardAsyncTimer (Timer_id);
Problem is when I click the button again and create a new timer. The
EventData1 param keeps showing time from the very first timer that was
created, not when button was clicked. I am assuming the by creating a new
timer each time the button is clicked, EventData1 shall show me time from
that in
stant.
vishi