Millis() / Unsigned long subtraction not working

There are many other "IF"s in the main programm that work with flags from sensors. So the time of each loop-run should be as short as possible to correct actor outputs in realtime. The code should definietly be easy to understand (use in thesis)