Paste: rdtsc

Author: slava
Mode: c
Date: Wed, 30 Sep 2009 01:59:56
Plain Text |
#include <stdio.h>

long long read_timestamp_counter(void)
{
    __asm__("rdtsc");
}

int main()
{
	long long x = read_timestamp_counter();
	printf("hey\n");
	long long y = read_timestamp_counter();
	printf("%ld\n",(long)(y - x));
}

New Annotation

Summary:
Author:
Mode:
Body: