Remove QueryPerformanceCounter code

This commit is contained in:
Akkadius 2015-01-19 03:22:23 -06:00
parent e428b373ac
commit ab4595f56d
4 changed files with 3 additions and 39 deletions

View File

@ -1,3 +1,5 @@
#include <iostream>
#include <string>

View File

@ -110,20 +110,4 @@ private:
extern EQEmuLog* LogFile;
#ifdef _EQDEBUG
class PerformanceMonitor {
public:
PerformanceMonitor(int64* ip) {
p = ip;
QueryPerformanceCounter(&tmp);
}
~PerformanceMonitor() {
LARGE_INTEGER tmp2;
QueryPerformanceCounter(&tmp2);
*p += tmp2.QuadPart - tmp.QuadPart;
}
LARGE_INTEGER tmp;
int64* p;
};
#endif
#endif

View File

@ -118,9 +118,6 @@ void EQEmuLogSys::ProcessLogWrite(uint16 log_category, std::string message)
if (process_log){
process_log << time_stamp << " " << StringFormat("[%s] ", Logs::LogCategoryName[log_category]).c_str() << message << std::endl;
}
else{
// std::cout << "[DEBUG] " << ":: There currently is no log file open for this process " << "\n";
}
}
uint16 EQEmuLogSys::GetConsoleColorFromCategory(uint16 log_category){
@ -140,7 +137,7 @@ uint16 EQEmuLogSys::GetConsoleColorFromCategory(uint16 log_category){
case Logs::Crash:
return Console::Color::LightRed;
default:
return Console::Color::White;
return Console::Color::Yellow;
}
}

View File

@ -455,25 +455,6 @@ int main(int argc, char** argv) {
worldserver.AsyncConnect();
}
#if defined(_EQDEBUG) && defined(DEBUG_PC)
QueryPerformanceCounter(&tmp3);
mainloop_time += tmp3.QuadPart - tmp2.QuadPart;
if (!--tmp0) {
tmp0 = 200;
printf("Elapsed Tics : %9.0f (%1.4f sec)\n", (double)mainloop_time, ((double)mainloop_time/tmp.QuadPart));
printf("NPCAI Tics : %9.0f (%1.2f%%)\n", (double)npcai_time, ((double)npcai_time/mainloop_time)*100);
printf("FindSpell Tics: %9.0f (%1.2f%%)\n", (double)findspell_time, ((double)findspell_time/mainloop_time)*100);
printf("AtkAllowd Tics: %9.0f (%1.2f%%)\n", (double)IsAttackAllowed_time, ((double)IsAttackAllowed_time/mainloop_time)*100);
printf("ClientPro Tics: %9.0f (%1.2f%%)\n", (double)clientprocess_time, ((double)clientprocess_time/mainloop_time)*100);
printf("ClientAtk Tics: %9.0f (%1.2f%%)\n", (double)clientattack_time, ((double)clientattack_time/mainloop_time)*100);
mainloop_time = 0;
npcai_time = 0;
findspell_time = 0;
IsAttackAllowed_time = 0;
clientprocess_time = 0;
clientattack_time = 0;
}
#endif
#ifdef EQPROFILE
#ifdef PROFILE_DUMP_TIME
if(profile_dump_timer.Check()) {