Indeed. I'm working on a correct pull request for Pieter.
Em 07/11/2013 03:42, Ivan Pechorin escreveu:
Felipe,
> We can make our own GetTickCount64 built around GetTickCount and
call it when GetTickCount64 is not available in Kernel32.dll. This
code supports Windows 2000 or greater, whereas calling GetTickCount64
directly from Kernel32.dll supports only Vista or greater.
>
> static DWORD s_wrap = 0;
> static DWORD s_lastTick = 0;
> static std::mutex s_wrapMutex;
>
> ULONGLONG MyGetTickCount64()
> {
> std::unique_lock<std::mutex>_(wrapMutex);
> DWORD currentTick = ::GetTickCount();
> if (currentTick < s_lastTick)
> ++s_wrap;
>
> s_lastTick = currentTick;
> return (static_cast<ULONGLONG>(s_wrap) << 32) + currentTick;
> }
This particular implementation breaks build on both Visual Studio 2008
and 2010 as there is no c++11 std::mutex in these compilers.
Regards,
Ivan
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev