ethersex/ethersex — pull request #133 by mguentner (2012-03-30 19:32:51+00:00)
Title: set and compare timer with the same variable

currentTime (was act_time) is set at the beginning of the control6 mainloop.
If the uptime now changes (++) during the control6 mainloop, the timers will
consequently be initialized with uptime-1.
This causes the wait/delay condition PT_WAIT_UNTIL(pt, TIMER($1) >= $2)
to fail since the resulting expression of TIMER($1) will be

uptime-1 - uptime

which is of course -1.
Due to the unsignedness of currentTime/uptime this results in

PT_WAIT_UNTIL(pt, 2^32 >= $2)

which is true (at least until 2038). So the THREAD won't be delayed as
expected.

Signed-off-by: Maximilian Güntner