Nope, the difference will be preserved by type promotion, unless the wrap around occurs more than once between calls or the counter counted more than half length counts (which also includes the former...).
Are you calling frequently enough sys_check_timeouts() ?
You should (read 'must').

Otherwise, you have a compiler problem, try this:
#include <stdio.h>
#include <stdint.h>

uint32_t now = 1;
uint32_t timeouts_last_time = 0xFFFFFFFF;

main()
{
uint32_t diff = now - timeouts_last_time;

        printf("%u\n",diff);
        if((now - timeouts_last_time) > 2)
                printf("Oops\n");
        else
                printf("OK\n");
}

$ ./td
2
OK


_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to