Defines | Functions | Variables
x86timer.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "x86timer.h"

Go to the source code of this file.


#define rdtscll(val)   __asm__ __volatile__ ("rdtsc" : "=A" (val))


unsigned long long get_cpu_ticks (void)
unsigned long long get_cpu_usecs (void)
unsigned int get_cpu_clock_speed (void)
static unsigned long _get_elapsed_microseconds (int reset, unsigned long long *start)
unsigned long get_elapsed_microseconds (int reset)
void cpu_delay_awhile (unsigned int delay_microseconds)


static unsigned int CPU_CLOCK_SPEED = -1

Define Documentation

#define rdtscll (   val)    __asm__ __volatile__ ("rdtsc" : "=A" (val))

Definition at line 22 of file x86timer.cpp.

Referenced by get_cpu_ticks(), and get_cpu_usecs().

Function Documentation

static unsigned long _get_elapsed_microseconds ( int  reset,
unsigned long long *  start 
) [static]


Definition at line 114 of file x86timer.cpp.

References get_cpu_usecs().

Referenced by cpu_delay_awhile(), and get_elapsed_microseconds().

void cpu_delay_awhile ( unsigned int  delay_microseconds)

Definition at line 143 of file x86timer.cpp.

References _get_elapsed_microseconds().

unsigned int get_cpu_clock_speed ( void  )

Definition at line 48 of file x86timer.cpp.


Referenced by initCardResource().

unsigned long long get_cpu_ticks ( void  )

Definition at line 26 of file x86timer.cpp.

References rdtscll.

unsigned long long get_cpu_usecs ( void  )

Definition at line 33 of file x86timer.cpp.

References CPU_CLOCK_SPEED, and rdtscll.

Referenced by _get_elapsed_microseconds().

unsigned long get_elapsed_microseconds ( int  reset)

Definition at line 135 of file x86timer.cpp.

References _get_elapsed_microseconds().

Referenced by measureBridge(), and measureBridgeStats().

Variable Documentation

unsigned int CPU_CLOCK_SPEED = -1 [static]

Definition at line 20 of file x86timer.cpp.

Referenced by get_cpu_clock_speed(), and get_cpu_usecs().