--- a/thermferm/simulator.c Wed Mar 27 15:49:31 2024 +0100 +++ b/thermferm/simulator.c Wed Mar 27 17:19:46 2024 +0100 @@ -21,6 +21,7 @@ *****************************************************************************/ #include "thermferm.h" +#include "delay.h" #include "simulator.h" int my_simulator_state = 0; @@ -124,9 +125,9 @@ simulator->air_temperature += ((simulator->beer_temperature - simulator->air_temperature) / 2500.0); simulator->chiller_temperature = simulator->cooler_temp; // Libk these } - usleep(100000); + mDelay(100L); } - usleep(50000); + mDelay(50L); } syslog(LOG_NOTICE, "Thread my_simulator_loop stopped");