Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
mpu.cpp File Reference
#include "always.h"
#include "win.h"
#include "mpu.h"
#include "math.h"
#include <assert.h>

Go to the source code of this file.

Classes

union  QuadValue
 
struct  QuadValue::QuadPart
 

Macros

#define ASM_RDTSC   _asm _emit 0x0f _asm _emit 0x31
 
#define MAX_TRIES   20
 
#define ROUND_THRESHOLD   6
 
#define TOLERANCE   1
 

Functions

unsigned long Get_CPU_Rate (unsigned long &high)
 
unsigned long Get_CPU_Clock (unsigned long &high)
 
void RDTSC (void)
 
int Get_RDTSC_CPU_Speed (void)
 

Macro Definition Documentation

◆ ASM_RDTSC

#define ASM_RDTSC   _asm _emit 0x0f _asm _emit 0x31

Definition at line 115 of file mpu.cpp.

◆ MAX_TRIES

#define MAX_TRIES   20

Definition at line 118 of file mpu.cpp.

◆ ROUND_THRESHOLD

#define ROUND_THRESHOLD   6

Definition at line 119 of file mpu.cpp.

◆ TOLERANCE

#define TOLERANCE   1

Definition at line 122 of file mpu.cpp.

Function Documentation

◆ Get_CPU_Clock()

unsigned long Get_CPU_Clock ( unsigned long & high)

Definition at line 87 of file mpu.cpp.

◆ Get_CPU_Rate()

unsigned long Get_CPU_Rate ( unsigned long & high)

Definition at line 68 of file mpu.cpp.

◆ Get_RDTSC_CPU_Speed()

int Get_RDTSC_CPU_Speed ( void )

Definition at line 138 of file mpu.cpp.

◆ RDTSC()

void RDTSC ( void )

Definition at line 127 of file mpu.cpp.