I have a function that I’m using while(true) to repeatedly scan memory addresses of an application to detect change. I sleep the thread 1 second between iterations and this helps performance. However, is there a way to create a custom event handler to do away with the loops?
I have a function that I’m using while(true) to repeatedly scan memory addresses of
Share
Have you looked into using a Timer with an Interval of 1000 (milliseconds)?
This also gives you a clean way out of your polling by simply destroying the timer, instead of having to check some condition and breaking out of your while loop.