[ 
https://issues.apache.org/jira/browse/PROTON-2030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16964072#comment-16964072
 ] 

ASF GitHub Bot commented on PROTON-2030:
----------------------------------------

jdanekrh commented on pull request #180: PROTON-2030 Use CLOCK_MONOTONIC in 
proactors for pn_transport_tick
URL: https://github.com/apache/qpid-proton/pull/180#discussion_r341160594
 
 

 ##########
 File path: c/src/proactor/win_iocp.c
 ##########
 @@ -3427,11 +3414,9 @@ const pn_netaddr_t *pn_listener_addr(pn_listener_t *l) {
 }
 
 pn_millis_t pn_proactor_now(void) {
-  FILETIME now;
-  GetSystemTimeAsFileTime(&now);
-  ULARGE_INTEGER t;
-  t.u.HighPart = now.dwHighDateTime;
-  t.u.LowPart = now.dwLowDateTime;
-  // Convert to milliseconds and adjust base epoch
-  return t.QuadPart / 10000 - 11644473600000;
+    return (pn_millis_t) pn_proactor_now_64();
+}
+
+int64_t pn_proactor_now_64(void) {
 
 Review comment:
   Thanks for the explanation. I am going to make the change.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Use CLOCK_MONOTONIC in proactors for pn_transport_tick
> ------------------------------------------------------
>
>                 Key: PROTON-2030
>                 URL: https://issues.apache.org/jira/browse/PROTON-2030
>             Project: Qpid Proton
>          Issue Type: Improvement
>          Components: proton-c
>    Affects Versions: proton-c-0.27.0
>            Reporter: Jiri Daněk
>            Priority: Major
>
> IOCP and epoll proactors are feeding wall clock time to pn_transport_tick. I 
> tested (with epoll) that changing system clock breaks heartbeating.
> The libuv proactor does use monotonic already.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to