mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[10931] Fix mangos build with old ACE libraries after [10924].
Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
parent
dfa30a495d
commit
e52ebaf7a9
2 changed files with 5 additions and 5 deletions
|
|
@ -27,7 +27,7 @@
|
||||||
typedef ACE_TSS<MTRand> MTRandTSS;
|
typedef ACE_TSS<MTRand> MTRandTSS;
|
||||||
static MTRandTSS mtRand;
|
static MTRandTSS mtRand;
|
||||||
|
|
||||||
static uint64 g_SystemTickTime = ACE_OS::gettimeofday().get_msec();
|
static ACE_Time_Value g_SystemTickTime = ACE_OS::gettimeofday();
|
||||||
|
|
||||||
uint32 WorldTimer::m_iTime = 0;
|
uint32 WorldTimer::m_iTime = 0;
|
||||||
uint32 WorldTimer::m_iPrevTime = 0;
|
uint32 WorldTimer::m_iPrevTime = 0;
|
||||||
|
|
@ -55,14 +55,14 @@ uint32 WorldTimer::getMSTime()
|
||||||
uint32 WorldTimer::getMSTime_internal(bool savetime /*= false*/)
|
uint32 WorldTimer::getMSTime_internal(bool savetime /*= false*/)
|
||||||
{
|
{
|
||||||
//get current time
|
//get current time
|
||||||
const uint64 currTime = ACE_OS::gettimeofday().get_msec();
|
const ACE_Time_Value currTime = ACE_OS::gettimeofday();
|
||||||
//calculate time diff between two world ticks
|
//calculate time diff between two world ticks
|
||||||
//special case: curr_time < old_time - we suppose that our time has not ticked at all
|
//special case: curr_time < old_time - we suppose that our time has not ticked at all
|
||||||
//this should be constant value otherwise it is possible that our time can start ticking backwards until next world tick!!!
|
//this should be constant value otherwise it is possible that our time can start ticking backwards until next world tick!!!
|
||||||
uint32 diff = 0;
|
uint32 diff = 0;
|
||||||
//regular case: curr_time >= old_time
|
//regular case: curr_time >= old_time
|
||||||
if(currTime >= g_SystemTickTime)
|
if(currTime > g_SystemTickTime)
|
||||||
diff = uint32(currTime - g_SystemTickTime);
|
diff = (currTime - g_SystemTickTime).msec();
|
||||||
|
|
||||||
//reset last system time value
|
//reset last system time value
|
||||||
if(savetime)
|
if(savetime)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10930"
|
#define REVISION_NR "10931"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue