01-17-2019 10:09 PM
Clicking on close program and have to wait 20 second??? I don't like it.
Create a structure that fire event or Queue. This will improve the user feel when use the application.
Benoit
01-18-2019 08:03 AM
"wait until ms multiple" Is a wonderful method to ensure all of those loops wake up at the same time and fight over which one gets the CPU (he says sarcastically).
The only time that function should be used is if each instance has a different value each of which are a multiple of different prime numbers.
Ben
01-18-2019 09:05 AM
Heh. I've gotten several quizzical looks during informal code reviews when people see my msec wait constants set for values like 201, 257, 993, etc. I don't generally go to the trouble of making them *formally* prime, I just arbitrarily offset a little bit from one of the nice round numbers that people might normally be inclined to use.
I also used to do some special stuff with loops that used a combo of "ms multiple" waits and regular waits to set various loops up at the same interval but different phasing for wake times.
-Kevin P
01-18-2019 09:09 AM
@Kevin_Price wrote:
Heh. I've gotten several quizzical looks during informal code reviews when people see my msec wait constants set for values like 201, 257, 993, etc. I don't generally go to the trouble of making them *formally* prime, I just arbitrarily offset a little bit from one of the nice round numbers that people might normally be inclined to use.
I also used to do some special stuff with loops that used a combo of "ms multiple" waits and regular waits to set various loops up at the same interval but different phasing for wake times.
-Kevin P
Nice!
Back when we only had one CPU and 40MHz clock rates... it made big difference.
Ben