Commit 6ce2fb2b authored by Luca Boccassi's avatar Luca Boccassi Committed by GitHub

Merge pull request #2162 from hnwyllmm/master

performance enhancement
parents b0313259 c5b528fd
......@@ -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
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment