From 8db85e4e3ac7592f9caa224614a7623c4d7dc097 Mon Sep 17 00:00:00 2001 From: BeniS Date: Sun, 3 Mar 2013 19:43:25 +1300 Subject: [PATCH] Use stdext::millis not g_clock.millis --- src/framework/sql/database.h | 3 +-- src/framework/sql/declarations.h | 2 +- src/framework/sql/mysql.cpp | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/framework/sql/database.h b/src/framework/sql/database.h index a5a72751..8161cdd5 100644 --- a/src/framework/sql/database.h +++ b/src/framework/sql/database.h @@ -24,7 +24,6 @@ #define DATABASE_H #include "declarations.h" -#include #include #include @@ -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. diff --git a/src/framework/sql/declarations.h b/src/framework/sql/declarations.h index 55eb62d7..8111389a 100644 --- a/src/framework/sql/declarations.h +++ b/src/framework/sql/declarations.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2012 TitanCore + * Copyright (c) 2010-2012 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 diff --git a/src/framework/sql/mysql.cpp b/src/framework/sql/mysql.cpp index b3305b39..7d6164ac 100644 --- a/src/framework/sql/mysql.cpp +++ b/src/framework/sql/mysql.cpp @@ -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);