23 #include <ndb_global.h>
26 #include "ndb_schema.hpp"
27 #include "ndb_error.hpp"
28 #include "userInterface.h"
30 #include <NdbThread.h>
52 static NdbMutex* startupMutex = NdbMutex_Create();
55 asyncDbConnect(
int parallellism){
56 NdbMutex_Lock(startupMutex);
59 pNDB->
init(parallellism + 1);
64 NdbMutex_Unlock(startupMutex);
70 asyncDbDisconnect(
Ndb* pNDB)
78 static bool initialized =
false;
79 static NDB_TICKS initSecs = 0;
80 static Uint32 initMicros = 0;
85 NdbTick_CurrentMicrosecond(&initSecs, &initMicros);
91 NdbTick_CurrentMicrosecond(&secs, µs);
92 double s = (double)secs - (
double)initSecs;
93 double us = (double)micros - (
double)initMicros;
95 timeValue = s + (us / 1000000.0);
105 now = ::time((time_t*)NULL);
106 tm_now = ::gmtime(&now);
109 "%d-%.2d-%.2d %.2d:%.2d:%.2d",
110 tm_now->tm_year + 1900,
117 ndbout_c(
"Time: %s", buf);