VirtualBox

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

最後變更 在這個檔案從71007是 69474,由 vboxsync 提交於 7 年 前

*: scm updates - header files should have 'svn:keywords=Id Revision' too (doesn't mean they have to use them).

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id Revision
檔案大小: 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# ifdef VBOX
13# include <iprt/win/windows.h>
14# else
15#include <windows.h>
16# endif
17#endif
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23typedef struct Timer
24{
25 double time0, elapsed;
26 char running;
27
28 int fd;
29#if defined (IRIX) || defined( IRIX64 )
30 unsigned long long counter64;
31 unsigned int counter32;
32 unsigned int cycleval;
33
34 volatile iotimer64_t *iotimer_addr64;
35 volatile iotimer32_t *iotimer_addr32;
36
37 void *unmapLocation;
38 int unmapSize;
39#elif defined(WINDOWS)
40 LARGE_INTEGER performance_counter, performance_frequency;
41 double one_over_frequency;
42#elif defined( Linux ) || defined( FreeBSD ) || defined(DARWIN) || defined(AIX) || defined (SunOS) || defined(OSF1)
43 struct timeval timeofday;
44#endif
45} CRTimer;
46
47CRTimer *crTimerNewTimer( void );
48void crDestroyTimer( CRTimer *t );
49void crStartTimer( CRTimer *t );
50void crStopTimer( CRTimer *t );
51void crResetTimer( CRTimer *t );
52double crTimerTime( CRTimer *t );
53
54#ifdef __cplusplus
55}
56#endif
57
58#endif /* CR_TIMER_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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