List:Commits« Previous MessageNext Message »
From:jack andrews Date:April 15 2009 12:39pm
Subject:bzr commit into mysql-5.1-telco-7.0 branch (jack:2868) Bug#44276
View as plain text  
#At file:///C:/w/repo/70/ based on revid:jack@stripped

 2868 jack andrews	2009-04-15
      bug#44276  NdbTick assert() in Ndbif.cpp

    modified:
      storage/ndb/src/common/portlib/win32/NdbTick.c
=== modified file 'storage/ndb/src/common/portlib/win32/NdbTick.c'
--- a/storage/ndb/src/common/portlib/win32/NdbTick.c	2008-10-02 09:41:59 +0000
+++ b/storage/ndb/src/common/portlib/win32/NdbTick.c	2009-04-15 12:39:16 +0000
@@ -15,6 +15,7 @@
 
 #include <ndb_global.h>
 #include "NdbTick.h"
+#include <my_sys.h>
 
 void NdbTick_Init()
 {
@@ -31,11 +32,14 @@ NDB_TICKS NdbTick_CurrentMillisecond(voi
 int
 NdbTick_CurrentMicrosecond(NDB_TICKS * secs, Uint32 * micros)
 {
-  LARGE_INTEGER liCount, liFreq;
-  QueryPerformanceCounter(&liCount);
-  QueryPerformanceFrequency(&liFreq);
-  *secs = liCount.QuadPart / liFreq.QuadPart;
-  liCount.QuadPart -= *secs * liFreq.QuadPart;
-  *micros = (Uint32)((liCount.QuadPart*1000000) / liFreq.QuadPart);
+  ulonglong t=my_micro_time(),
+            ullsecs,
+            ullmicros;
+
+  ullsecs=t/(1000*1000);
+  ullmicros=t-ullsecs;
+  assert(ullmicros<MAX_UINT32);
+  *secs=ullsecs;
+  *micros=(Uint32)ullmicros;
   return 0;
 }


Attachment: [text/bzr-bundle] bzr/jack@sun.com-20090415123916-cihfonyha6m6lprm.bundle
Thread
bzr commit into mysql-5.1-telco-7.0 branch (jack:2868) Bug#44276jack andrews15 Apr
  • Re: bzr commit into mysql-5.1-telco-7.0 branch (jack:2868) Bug#44276Magnus BlĂ„udd16 Apr