reman3/Rayman_X/cpa/public/TMR/specif/counter.h

46 lines
1.0 KiB
C

/***********************************************************************************/
/* counter.h : Specific header file for the CPA Timer library. Pentium Version */
/* Author : FBF */
/* Last update : 15/04/98 */
/***********************************************************************************/
#ifndef _TIMER_SPECIF_H
#define _TIMER_SPECIF_H
/* FBf 15.04.98 fast inline function to return the internal pentium counter */
#ifndef WATCOM
#if defined(__cplusplus)
extern "C"
{
#endif
/******** VISUAL 5 ************/
#pragma warning (disable : 4035) /* To prevent from displaying the 'no return value' warning message*/
#define RDTSC __asm _emit 0x0F __asm _emit 0x31
__inline unsigned long __fastcall TMR_fn_ulFastGetInternalCounter()
{
__asm
{
push edx
RDTSC
pop edx
}
}
#pragma warning (default : 4035)
#if defined(__cplusplus)
}
#endif
#endif /*watcom*/
#endif /*_timer_specif_h*/