Hacker News new | ask | show | jobs
by jcalvinowens 47 days ago
>> [...] and thread 2’s time may be earlier than thread 1’s

> If it does plain RDTSC, it may not be fine.

I'm a little surprised how easily it happens with plain rdtsc on my hardware: https://gist.github.com/jcalvinowens/4c0c25e753f8ce2d0a6ca48...

    # time ./a.out 
    a.out: local=4692633034088164 < remote=4692633034088165
    real    0m0.025s