VirtualBox

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

最後變更 在這個檔案從49216是 15532,由 vboxsync 提交於 16 年 前

crOpenGL: export to OSE

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 1.1 KB
 
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 */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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