Re:A portable high-resolution timestamp in C++
by apaprocki on Friday June 20, 2014 @04:41PM
(#7922770)
Here's our (Bloomberg) version of this. The bsls::TimeUtil component is used to implement the bsls::Stopwatch. It supports high-res timestamps on OSX/Windows as well as Solaris, AIX, and HP-UX (SPARC, POWER, IA64). It's a good base to start from and we'll continually tweak it for more performance as platforms change (I think there a few patches in the pipeline).
https://github.com/bloomberg/bde/blob/master/groups/bsl/bsls...
Component docs: http://bloomberg.github.io/bde/group__bsls__timeutil.html