lwip - Fix time calculation.
The `sys_now` function is supposed to calculate milliseconds since boot.
However, the operands were not in the correct order, so the units
were off.
In sim, this caused the tcpip_thread() task handler to never yield to
other tasks during timeout calculation.
@@ -106,7 +106,7 @@ sys_now(void)
/*
* XXX not right when g_os_time rolls over
*/
- t = os_time_get() * OS_TICKS_PER_SEC / 1000;
+ t = os_time_get() * 1000 / OS_TICKS_PER_SEC;
return t;
}
