// rdtsc.cpp // processor: x86, x64 #include <stdio.h> #include <intrin.h> #pragma intrinsic(__rdtsc) int main() { unsigned __int64 i; i = __rdtsc(); printf_s("%I64d ticks\n", i); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter