ccollins476ad closed pull request #886: lwip - Fix time calculation

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/net/ip/include/arch/sys_arch.h b/net/ip/include/arch/sys_arch.h
index f8c53a897..74ddad22b 100644
--- a/net/ip/include/arch/sys_arch.h
+++ b/net/ip/include/arch/sys_arch.h
@@ -101,13 +101,10 @@ sys_mutex_unlock(sys_mutex_t *mutex)
 static inline uint32_t
-    uint32_t t;
+    uint64_t t;
-    /*
-     * XXX not right when g_os_time rolls over
-     */
-    t = os_time_get() * OS_TICKS_PER_SEC / 1000;
-    return t;
+    t = os_time_get();
+    return t * 1000 / OS_TICKS_PER_SEC;
 static inline err_t


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

Reply via email to