
15 Aug
2011
15 Aug
'11
2:25 p.m.
On Mon, Aug 15, 2011 at 9:07 AM, Lars Viklund
On Mon, Aug 15, 2011 at 08:54:09AM -0500, Chris Cleeland wrote:
If you are on an x86 platform, you can use the "rdtsc" assembly instruction to obtain processor tick counts.
Note that many processors do not synchronize such low-level tickcounts between cores or packages, so unless you have thread affinity for a single particular one, you're in deep water unless you know your hardware does not exhibit these kinds of behaviours.
Good point; thanks for pointing that out. In my case, I have thread affinity, guaranteed by other software requirements that pre-date the timing, so I'd forgotten.