qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adel Boutros <adelbout...@live.com>
Subject [Qpid-dispatch] timespec not defined on Windows
Date Fri, 22 Apr 2016 16:24:52 GMT
Hello,

While compiling Qpid-dispatch on Windows using Visual Studio 2013 64-bit, I
encountered a code related to time which doesn't work under windows.

In *src\server.c* thread_run method, there is a block of code using timespec
which is not defined in Windows

/struct timespec tv;
clock_gettime(CLOCK_REALTIME, &tv);
qd_timestamp_t milliseconds = ((qd_timestamp_t)tv.tv_sec) * 1000 +
tv.tv_nsec / 1000000;
qd_timer_visit_LH(milliseconds);/

I have found two ways to solve it:
1) One inspired from Qpid C++ broker
(qpid\cpp\src\qpid\sys\windows\Time.cpp: FromEpoch and outputHiresNow) but
this will add a dependency to Boost for qpid-dispatch.
2) The other found on Stackoverflow  timespec-equivalent-for-windows
<http://stackoverflow.com/questions/8583308/timespec-equivalent-for-windows>  

Which one would you find more appropriate?

Regards,
Adel Boutros
www.murex.com



--
View this message in context: http://qpid.2158936.n2.nabble.com/Qpid-dispatch-timespec-not-defined-on-Windows-tp7642532.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message