Use stdext::millis not g_clock.millis

master
BeniS 11 years ago
parent 02d32565e9
commit 8db85e4e3a

@ -24,7 +24,6 @@
#define DATABASE_H
#include "declarations.h"
#include <framework/core/clock.h>
#include <framework/luaengine/luaobject.h>
#include <boost/thread.hpp>
@ -48,7 +47,7 @@ class Database : public LuaObject
/**
* Database ...
*/
virtual void use() {m_use = g_clock.millis();}
virtual void use() {m_use = stdext::millis();}
/**
* Database connector.

@ -1,5 +1,5 @@
/*
* Copyright (c) 2010-2012 TitanCore <https://github.com/edubart/titancore>
* Copyright (c) 2010-2012 OTClient <https://github.com/edubart/otclient>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal

@ -76,10 +76,10 @@ bool DatabaseMySQL::handleError()
g_logger.error("MYSQL connection lost, trying to reconnect...");
setConnected(false);
ticks_t startTime = g_clock.millis();
ticks_t startTime = stdext::millis();
while(true) {
bool connected = (mysql_ping(m_handle) == 0);
ticks_t diffTime = (g_clock.millis() - startTime);
ticks_t diffTime = (stdext::millis() - startTime);
if(connected) {
g_logger.info(stdext::format("MySQL reconneted in %d ms", diffTime));
setConnected(true);

Loading…
Cancel
Save