06-03-2021 02:44 PM
I'm trying to access a timer's time since last tick. According to this article, this can be done by using eventData2: "eventData2 is a pointer to a double that represents the time elapsed since the last EVENT_TIMER_TICK, in seconds." However, the auto-generated callback prototype has it listed as an int instead of a pointer to a double. From what I can tell, this int seems like it could represent the pointer to double, as its value looks like an address (1703072).
Nonetheless, I can't simply dereference it because the compiler treats it as an int. I tried to rewrite the callback prototype, but I got an error in LoadPanel, which looks to me like the rest of the code intends to treat it like an int as well. Am I understanding this correctly and is there a workaround?
Solved! Go to Solution.
06-03-2021 04:20 PM
This works:
double et
et = *(double *)eventData2;