source:
branches/lib/GDE/MUSCLE/src/timing.h
| Last change on this file was 10390, checked in by aboeckma, 12 years ago | |
|---|---|
| File size: 364 bytes | |
| Line | |
|---|---|
| 1 | #if WIN32 |
| 2 | |
| 3 | typedef unsigned __int64 TICKS; |
| 4 | |
| 5 | #pragma warning(disable:4035) |
| 6 | inline TICKS GetClockTicks() |
| 7 | { |
| 8 | _asm |
| 9 | { |
| 10 | _emit 0x0f |
| 11 | _emit 0x31 |
| 12 | } |
| 13 | } |
| 14 | |
| 15 | #define StartTimer() __int64 t1__ = GetClockTicks() |
| 16 | |
| 17 | #define GetElapsedTicks() (GetClockTicks() - t1__) |
| 18 | |
| 19 | static double TicksToSecs(TICKS t) |
| 20 | { |
| 21 | return (__int64) t/2.5e9; |
| 22 | } |
| 23 | |
| 24 | #endif // WIN32 |
Note: See TracBrowser
for help on using the repository browser.
