Im is currently working on an embedded project where most of the subsystems are based on synchronization.
I have been looking for a lot of solutions to avoid the problems with transitioning timers, but one thing still puzzles me.
I am currently using two unsigned long add-ons like this.
ulong t1 = tick of last event;
ulong t2 = current tick;
if ( t2 - t1 >= limit ){
do something
}
Others have suggested that it is necessary to pass the result of t2-t1 to the signed object before this works, but I cannot understand why. Any other ideas or suggestions?
source
share