Changeset 689 in vbox for trunk/src/VBox/Frontends/VirtualBox/include/VBoxDefs.h
- Timestamp:
- Feb 6, 2007 5:16:02 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxDefs.h
r382 r689 31 31 32 32 #include <iprt/alloc.h> 33 #include <iprt/asm.h> 33 34 34 35 #ifdef VBOX_GUI_DEBUG … … 81 82 public: 82 83 inline static uint64_t ticks() { 83 #if defined (Q_CC_MSVC) 84 union { 85 uint64_t ll; 86 struct { 87 uint32_t low, high; 88 } l; 89 } val; 90 __asm rdtsc 91 __asm mov val.l.low, eax 92 __asm mov val.l.high, edx 93 return val.ll; 94 #elif defined (Q_CC_GNU) 95 uint64_t val; 96 asm volatile ("rdtsc" : "=A" (val)); 97 return val; 98 #else 99 return 0; 100 #endif 84 return ASMReadTSC(); 101 85 } 102 86 inline static uint64_t msecs( uint64_t tcks ) {
Note:
See TracChangeset
for help on using the changeset viewer.