do {
now=gras_os_time();
+
TRY{
if (period - now + begin > 0)
gras_msg_handle(period - now + begin);
RETHROW0("Error while waiting for messages: %s");
xbt_ex_free(e);
}
- } while (now - begin < period);
+ /* Epsilon to avoid numerical stability issues were the waited interval is so small that the global clock cannot notice the increment */
+ } while (now - begin < period - 0.000001);
}
/** @brief Handle an incomming message or timer (or wait up to \a timeOut seconds)