Adel,
First of all, we should create an abstraction for timespec that is
usable on all platforms and then provide OS-specific implementations.
Dispatch doesn't currently need time at granularity above milliseconds.
To answer your question, I don't want to solve this in a way that
requires new dependencies in Linux like Boost.
-Ted
On 04/22/2016 12:24 PM, Adel Boutros wrote:
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: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]