Merge pull request #2162 from hnwyllmm/master

performance enhancement
This commit is contained in:
Luca Boccassi 2016-10-14 13:55:13 +01:00 committed by GitHub
commit 6ce2fb2b06

View File

@ -234,6 +234,8 @@ uint64_t zmq::clock_t::rdtsc ()
asm("\tstck\t%0\n" : "=Q" (tsc) : : "cc");
return(tsc);
#else
return 0;
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return (uint64_t)(ts.tv_sec) * 1000000000 + ts.tv_nsec;
#endif
}