View Single Post
Old 7th June 2008
ephemera's Avatar
ephemera ephemera is offline
Knuth's homeboy
 
Join Date: Apr 2008
Posts: 537
Default

yurtesen,

in the code you gave i am wondering why a 1 sec delay wasn't used directly like:
Code:
        while (n-- > 0) {
                __asm__ __volatile__ ("rdtsc" : "=A" (t1));
                ts.tv_sec = 1;
                ts.tv_nsec = 0;
                nanosleep(&ts, NULL);
                __asm__ __volatile__ ("rdtsc" : "=A" (t2));
                printf("%llu\n", t2 - t1);
        }
any idea?
Reply With Quote