List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:October 30 2007 12:02pm
Subject:Rev 222: Added helper getTimeMicros() function. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmerge
View as plain text  
At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmerge

------------------------------------------------------------
revno: 222
revision-id: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: ndbjmerge
timestamp: Tue 2007-10-30 12:02:14 +0000
message:
  Added helper getTimeMicros() function.
modified:
  swig/ndbglobals.i              globals.i-20070228021421-qkr4cbpxymyqdrf3-7
=== modified file 'swig/ndbglobals.i'
--- a/swig/ndbglobals.i	2007-10-30 08:55:54 +0000
+++ b/swig/ndbglobals.i	2007-10-30 12:02:14 +0000
@@ -58,6 +58,13 @@
     cb->callback(theOp,theNdb);
   }
 
+  long long getTimeMicros() 
+  {
+    struct timeval tTime;
+    gettimeofday(&tTime, 0);
+    long long microSeconds = (long long) tTime.tv_sec * 1000000 + tTime.tv_usec;
+    return microSeconds;
+  }
 
 
 typedef int voidint; 
@@ -75,6 +82,7 @@
 } BYTES; 
 %}
 
+long long getTimeMicros();
 /*
 typedef char my_bool;
 enum enum_mysql_timestamp_type

Thread
Rev 222: Added helper getTimeMicros() function. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/ndbjmergeMonty Taylor30 Oct