3 ms·
One way would be to use the rdtsc instruction, which reports how many cycles have been executed since the processor was reset.
by benwaffle 9y ago
One way would be to use the rdtsc instruction, which reports how many cycles have been executed since the processor was reset.
- 1_2__4 9y agoWhich is precisely why Firefox is releasing an update that tweaks high resolution timing. I guess tweaks probably means breaks for some uses cases but that’s likely unavoidable and worth it.
- chriszelazo 9y agoI defintiely agree
- vardump 9y agoUsing rdtscp is better in this case than rdtsc, because it's a serializing instruction. So speculation (instruction reordering) itself doesn't affect the results.