You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/03/07 21:40:51 UTC

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

ccollins476ad closed pull request #886: lwip - Fix time calculation
URL: https://github.com/apache/mynewt-core/pull/886
 
 
   

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
 sys_now(void)
 {
-    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:
users@infra.apache.org


With regards,
Apache Git Services