dxAccurateTime.c 304 B

123456789101112131415161718192021222324252627282930
  1. #include "dkpltfrm.h"
  2. static void readTSC(UINT64 *bigOne)
  3. {
  4. unsigned long xhigh;
  5. unsigned long xlow;
  6. __asm
  7. {
  8. rdtsc
  9. mov [xlow],EAX;
  10. mov [xhigh],edx;
  11. }
  12. *bigOne = xhigh ;
  13. *bigOne <<= 32;
  14. *bigOne |= xlow;
  15. return;
  16. }
  17. void DXL_AccurateTime(UINT64 *temp)
  18. {
  19. readTSC(temp);
  20. }