mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-03 19:13:49 +00:00
Merge branch 'master' of https://github.com/azerothcore/azerothcore-wotlk into dir-restructure
This commit is contained in:
@@ -7,11 +7,9 @@
|
||||
#ifndef _MMAP_COMMON_H
|
||||
#define _MMAP_COMMON_H
|
||||
|
||||
#include "Common.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <ace/OS_NS_sys_time.h>
|
||||
|
||||
#include "Define.h"
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <stddef.h>
|
||||
@@ -53,7 +51,7 @@ namespace MMAP
|
||||
if (*++filter == '\0') // wildcard at end of filter means all remaing chars match
|
||||
return true;
|
||||
|
||||
while (true)
|
||||
for (;;)
|
||||
{
|
||||
if (*filter == *str)
|
||||
break;
|
||||
@@ -125,26 +123,6 @@ namespace MMAP
|
||||
|
||||
return LISTFILE_OK;
|
||||
}
|
||||
|
||||
inline uint32 getMSTime()
|
||||
{
|
||||
static const ACE_Time_Value ApplicationStartTime = ACE_OS::gettimeofday();
|
||||
return (ACE_OS::gettimeofday() - ApplicationStartTime).msec();
|
||||
}
|
||||
|
||||
inline uint32 getMSTimeDiff(uint32 oldMSTime, uint32 newMSTime)
|
||||
{
|
||||
// getMSTime() have limited data range and this is case when it overflow in this tick
|
||||
if (oldMSTime > newMSTime)
|
||||
return (0xFFFFFFFF - oldMSTime) + newMSTime;
|
||||
else
|
||||
return newMSTime - oldMSTime;
|
||||
}
|
||||
|
||||
inline uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
|
||||
{
|
||||
return getMSTimeDiff(oldMSTime, getMSTime());
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user