4 ms·
I solve this problem with a time check coupled with an atomic test-and-set of a global variable. If the global is less than the timer, use the timer value and
by dreamcompiler 3y ago
I solve this problem with a time check coupled with an atomic test-and-set of a global variable.
If the global is less than the timer, use the timer value and set the global to it.
If the global is greater than or equal to the timer, increment it and use that value.