removed persit file load time to help windows build

This commit is contained in:
Brad Hefta-Gaub 2014-01-10 21:32:44 -08:00
parent dec16c8f0b
commit ef60aec81e
4 changed files with 11 additions and 27 deletions

View file

@ -202,26 +202,13 @@ int OctreeServer::civetwebRequestHandler(struct mg_connection* connection) {
// display voxel file load time
if (theServer->isInitialLoadComplete()) {
time_t* loadCompleted = theServer->getLoadCompleted();
if (loadCompleted) {
tm* voxelsLoadedAtLocal = localtime(loadCompleted);
const int MAX_TIME_LENGTH = 128;
char buffer[MAX_TIME_LENGTH];
strftime(buffer, MAX_TIME_LENGTH, "%m/%d/%Y %X", voxelsLoadedAtLocal);
mg_printf(connection, "%s File Loaded At: %s", theServer->getMyServerName(), buffer);
// Convert now to tm struct for UTC
tm* voxelsLoadedAtUTM = gmtime(theServer->getLoadCompleted());
if (gmtm != NULL) {
strftime(buffer, MAX_TIME_LENGTH, "%m/%d/%Y %X", voxelsLoadedAtUTM);
mg_printf(connection, " [%s UTM] ", buffer);
}
if (theServer->isPersistEnabled()) {
mg_printf(connection, "%s File Persist Enabled...\r\n", theServer->getMyServerName());
} else {
mg_printf(connection, "%s File Persist Disabled...\r\n", theServer->getMyServerName());
}
mg_printf(connection, "%s", "\r\n");
uint64_t msecsElapsed = theServer->getLoadElapsedTime() / USECS_PER_MSEC;;
float seconds = (msecsElapsed % MSECS_PER_MIN)/(float)MSECS_PER_SEC;
int minutes = (msecsElapsed/(MSECS_PER_MIN)) % MIN_PER_HOUR;

View file

@ -42,7 +42,7 @@ public:
static OctreeServer* GetInstance() { return _theInstance; }
bool isInitialLoadComplete() const { return (_persistThread) ? _persistThread->isInitialLoadComplete() : true; }
time_t* getLoadCompleted() { return (_persistThread) ? _persistThread->getLoadCompleted() : NULL; }
bool isPersistEnabled() const { return (_persistThread) ? true : false; }
uint64_t getLoadElapsedTime() const { return (_persistThread) ? _persistThread->getLoadElapsedTime() : 0; }
// Subclasses must implement these methods

View file

@ -37,7 +37,6 @@ bool OctreePersistThread::process() {
}
_tree->unlock();
_loadCompleted = time(0);
uint64_t loadDone = usecTimestampNow();
_loadTimeUSecs = loadDone - loadStarted;

View file

@ -24,8 +24,6 @@ public:
OctreePersistThread(Octree* tree, const QString& filename, int persistInterval = DEFAULT_PERSIST_INTERVAL);
bool isInitialLoadComplete() const { return _initialLoadComplete; }
time_t* getLoadCompleted() { return &_loadCompleted; }
uint64_t getLoadElapsedTime() const { return _loadTimeUSecs; }
signals: