From f8fe689a81f906d1b91bb3220acde2a4ecb14c5b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 May 2024 05:01:46 +0200 Subject: Adding upstream version 6.0.4-dfsg. Signed-off-by: Daniel Baumann --- src/VBox/GuestHost/OpenGL/include/cr_timer.h | 58 ++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 src/VBox/GuestHost/OpenGL/include/cr_timer.h (limited to 'src/VBox/GuestHost/OpenGL/include/cr_timer.h') diff --git a/src/VBox/GuestHost/OpenGL/include/cr_timer.h b/src/VBox/GuestHost/OpenGL/include/cr_timer.h new file mode 100644 index 00000000..9385a76c --- /dev/null +++ b/src/VBox/GuestHost/OpenGL/include/cr_timer.h @@ -0,0 +1,58 @@ +#ifndef CR_TIMER_H +#define CR_TIMER_H + +#ifndef WINDOWS +#include + +#if defined (IRIX) || defined( IRIX64 ) +typedef unsigned long long iotimer64_t; +typedef unsigned int iotimer32_t; +#endif +#else +# ifdef VBOX +# include +# else +#include +# endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct Timer +{ + double time0, elapsed; + char running; + + int fd; +#if defined (IRIX) || defined( IRIX64 ) + unsigned long long counter64; + unsigned int counter32; + unsigned int cycleval; + + volatile iotimer64_t *iotimer_addr64; + volatile iotimer32_t *iotimer_addr32; + + void *unmapLocation; + int unmapSize; +#elif defined(WINDOWS) + LARGE_INTEGER performance_counter, performance_frequency; + double one_over_frequency; +#elif defined( Linux ) || defined( FreeBSD ) || defined(DARWIN) || defined(AIX) || defined (SunOS) || defined(OSF1) + struct timeval timeofday; +#endif +} CRTimer; + +CRTimer *crTimerNewTimer( void ); +void crDestroyTimer( CRTimer *t ); +void crStartTimer( CRTimer *t ); +void crStopTimer( CRTimer *t ); +void crResetTimer( CRTimer *t ); +double crTimerTime( CRTimer *t ); + +#ifdef __cplusplus +} +#endif + +#endif /* CR_TIMER_H */ -- cgit v1.2.3