Tags:
create new tag
view all tags

cycle_counter.h

typedef unsigned long long CPU_clock_num;
CPU_clock_num realcc(void);


cycle_counter.c

#include "cycle_counter.h"

CPU_clock_num realcc(void) {
	unsigned long long cc;

	/* read the 64 bit process cycle counter into variable cc */

	asm volatile("rdtsc" : "=r"(cc) : : "memory");

	return cc;
}

-- AntonioValletta - 23 Nov 2001
Topic revision: r1 - 2001-11-23 - AntonioValletta






 
Questo sito usa cookies, usandolo ne accettate la presenza. (CookiePolicy)
Torna al Dipartimento di Informatica
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback