Why does std::chrono now() uses slow syscall?

Jonathan Wakely jwakely.gcc@gmail.com
Mon Jan 27 00:12:00 GMT 2014

On 26 January 2014 22:50, Keith Erickson wrote:
> So how do I use the fast clock_gettime in a single threaded program on glibc
> 2.12 (rhel6) without pulling in pthread?

AFAIK you can't.  clock_gettime is in librt.so which depends on libpthread.so

Glibc 2.17 moved clock_gettime out of librt.so specifically to solve
this issue, because that was the only way to get clock_gettime without
depending on libpthread.so

More information about the Gcc-help mailing list