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 )
|
---|
8 | typedef unsigned long long iotimer64_t;
|
---|
9 | typedef unsigned int iotimer32_t;
|
---|
10 | #endif
|
---|
11 | #else
|
---|
12 | #include <windows.h>
|
---|
13 | #endif
|
---|
14 |
|
---|
15 | #ifdef __cplusplus
|
---|
16 | extern "C" {
|
---|
17 | #endif
|
---|
18 |
|
---|
19 | typedef 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 |
|
---|
43 | CRTimer *crTimerNewTimer( void );
|
---|
44 | void crDestroyTimer( CRTimer *t );
|
---|
45 | void crStartTimer( CRTimer *t );
|
---|
46 | void crStopTimer( CRTimer *t );
|
---|
47 | void crResetTimer( CRTimer *t );
|
---|
48 | double 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.