VirtualBox

source: vbox/trunk/src/VBox/GuestHost/OpenGL/include/cr_timer.h@ 36843

Last change on this file since 36843 was 15532, checked in by vboxsync, 16 years ago

crOpenGL: export to OSE

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.1 KB
Line 
1#ifndef CR_TIMER_H
2#define CR_TIMER_H
3
4#ifndef WINDOWS
5#include <sys/time.h>
6
7#if defined (IRIX) || defined( IRIX64 )
8typedef unsigned long long iotimer64_t;
9typedef unsigned int iotimer32_t;
10#endif
11#else
12#include <windows.h>
13#endif
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19typedef struct Timer
20{
21 double time0, elapsed;
22 char running;
23
24 int fd;
25#if defined (IRIX) || defined( IRIX64 )
26 unsigned long long counter64;
27 unsigned int counter32;
28 unsigned int cycleval;
29
30 volatile iotimer64_t *iotimer_addr64;
31 volatile iotimer32_t *iotimer_addr32;
32
33 void *unmapLocation;
34 int unmapSize;
35#elif defined(WINDOWS)
36 LARGE_INTEGER performance_counter, performance_frequency;
37 double one_over_frequency;
38#elif defined( Linux ) || defined( FreeBSD ) || defined(DARWIN) || defined(AIX) || defined (SunOS) || defined(OSF1)
39 struct timeval timeofday;
40#endif
41} CRTimer;
42
43CRTimer *crTimerNewTimer( void );
44void crDestroyTimer( CRTimer *t );
45void crStartTimer( CRTimer *t );
46void crStopTimer( CRTimer *t );
47void crResetTimer( CRTimer *t );
48double crTimerTime( CRTimer *t );
49
50#ifdef __cplusplus
51}
52#endif
53
54#endif /* CR_TIMER_H */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette