Skip to content

Commit

Permalink
[10931] Fix mangos build with old ACE libraries after [10924].
Browse files Browse the repository at this point in the history
Signed-off-by: Ambal <pogrebniak@gala.net>
  • Loading branch information
Ambal committed Dec 28, 2010
1 parent 140555a commit 5863a87
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/shared/Util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
typedef ACE_TSS<MTRand> MTRandTSS;
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_iPrevTime = 0;
Expand Down Expand Up @@ -55,14 +55,14 @@ uint32 WorldTimer::getMSTime()
uint32 WorldTimer::getMSTime_internal(bool savetime /*= false*/)
{
//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
//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!!!
uint32 diff = 0;
//regular case: curr_time >= old_time
if(currTime >= g_SystemTickTime)
diff = uint32(currTime - g_SystemTickTime);
if(currTime > g_SystemTickTime)
diff = (currTime - g_SystemTickTime).msec();

//reset last system time value
if(savetime)
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10930"
#define REVISION_NR "10931"
#endif // __REVISION_NR_H__

0 comments on commit 5863a87

Please sign in to comment.