diff options
author | Shauren <shauren.trinity@gmail.com> | 2014-07-19 03:38:57 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2014-07-19 03:51:11 +0200 |
commit | 909acdbac3223d8c788b1b5dc42b6dfab8b604ab (patch) | |
tree | 2a0ade312aad77ca032015c6957a4a9005aa0b94 /dep/acelite/ace/System_Time.cpp | |
parent | 5daf3d360686ea8ff2d97a48fca24f0bf42ef098 (diff) | |
parent | 1866d8cc06e2b8c2722ccf69ee3f52ceda93bc27 (diff) |
Merge remote-tracking branch 'origin/master' into 4.3.4
Conflicts:
src/server/authserver/Main.cpp
src/server/authserver/Realms/RealmList.cpp
src/server/authserver/Realms/RealmList.h
src/server/authserver/Server/AuthSession.cpp
src/server/authserver/Server/AuthSocket.h
src/server/authserver/Server/RealmAcceptor.h
src/server/game/Accounts/AccountMgr.h
src/server/game/Achievements/AchievementMgr.cpp
src/server/game/Achievements/AchievementMgr.h
src/server/game/Battlegrounds/ArenaTeamMgr.cpp
src/server/game/Conditions/ConditionMgr.cpp
src/server/game/DungeonFinding/LFGMgr.h
src/server/game/Entities/Object/Object.h
src/server/game/Entities/Player/Player.cpp
src/server/game/Entities/Player/Player.h
src/server/game/Entities/Unit/Unit.cpp
src/server/game/Handlers/BattleGroundHandler.cpp
src/server/game/Movement/Spline/MoveSplineFlag.h
src/server/game/Quests/QuestDef.cpp
src/server/game/Quests/QuestDef.h
src/server/game/Server/WorldSession.cpp
src/server/game/Server/WorldSession.h
src/server/game/Server/WorldSocket.cpp
src/server/game/Server/WorldSocket.h
src/server/game/Spells/Spell.cpp
src/server/scripts/Commands/cs_debug.cpp
src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp
src/server/scripts/Spells/spell_mage.cpp
src/server/scripts/Spells/spell_rogue.cpp
src/server/scripts/Spells/spell_shaman.cpp
src/server/scripts/Spells/spell_warrior.cpp
src/server/shared/Cryptography/BigNumber.h
src/server/worldserver/RemoteAccess/RASocket.cpp
src/server/worldserver/worldserver.conf.dist
Diffstat (limited to 'dep/acelite/ace/System_Time.cpp')
-rw-r--r-- | dep/acelite/ace/System_Time.cpp | 140 |
1 files changed, 0 insertions, 140 deletions
diff --git a/dep/acelite/ace/System_Time.cpp b/dep/acelite/ace/System_Time.cpp deleted file mode 100644 index 1a270dc7f09..00000000000 --- a/dep/acelite/ace/System_Time.cpp +++ /dev/null @@ -1,140 +0,0 @@ -// $Id: System_Time.cpp 91286 2010-08-05 09:04:31Z johnnyw $ - -#include "ace/System_Time.h" -#include "ace/MMAP_Memory_Pool.h" -#include "ace/Malloc_T.h" -#include "ace/Null_Mutex.h" -#include "ace/Time_Value.h" -#include "ace/OS_NS_string.h" -#include "ace/OS_NS_time.h" - - - -ACE_BEGIN_VERSIONED_NAMESPACE_DECL - -ACE_System_Time::ACE_System_Time (const ACE_TCHAR *poolname) - : shmem_ (0) - , delta_time_ (0) -{ - ACE_TRACE ("ACE_System_Time::ACE_System_Time"); - - // Only create a new unique filename for the memory pool file - // if the user didn't supply one... - if (poolname == 0) - { -#if defined (ACE_DEFAULT_BACKING_STORE) - // Create a temporary file. - ACE_OS::strcpy (this->poolname_, - ACE_DEFAULT_BACKING_STORE); -#else /* ACE_DEFAULT_BACKING_STORE */ - if (ACE::get_temp_dir (this->poolname_, - MAXPATHLEN - 17) == -1) - // -17 for ace-malloc-XXXXXX - { - ACE_ERROR ((LM_ERROR, - ACE_TEXT ("Temporary path too long, ") - ACE_TEXT ("defaulting to current directory\n"))); - this->poolname_[0] = 0; - } - - // Add the filename to the end - ACE_OS::strcat (this->poolname_, ACE_TEXT ("ace-malloc-XXXXXX")); - -#endif /* ACE_DEFAULT_BACKING_STORE */ - } - else - ACE_OS::strsncpy (this->poolname_, - poolname, - (sizeof this->poolname_ / sizeof (ACE_TCHAR))); - - ACE_NEW (this->shmem_, - ALLOCATOR (this->poolname_)); -} - -ACE_System_Time::~ACE_System_Time (void) -{ - ACE_TRACE ("ACE_System_Time::~ACE_System_Time"); - delete this->shmem_; -} - -// Get the local system time. - -int -ACE_System_Time::get_local_system_time (time_t & time_out) -{ - ACE_TRACE ("ACE_System_Time::get_local_system_time"); - time_out = ACE_OS::time (0); - return 0; -} - -int -ACE_System_Time::get_local_system_time (ACE_Time_Value &time_out) -{ - ACE_TRACE ("ACE_System_Time::get_local_system_time"); - time_out.set (ACE_OS::time (0), 0); - return 0; -} - -// Get the system time of the central time server. - -int -ACE_System_Time::get_master_system_time (time_t &time_out) -{ - ACE_TRACE ("ACE_System_Time::get_master_system_time"); - - if (this->delta_time_ == 0) - { - // Try to find it - void * temp = 0; - if (this->shmem_->find (ACE_DEFAULT_TIME_SERVER_STR, temp) == -1) - { - // No time entry in shared memory (meaning no Clerk exists) - // so return the local time of the host. - return this->get_local_system_time (time_out); - } - else - // Extract the delta time. - this->delta_time_ = static_cast<long *> (temp); - } - - time_t local_time; - - // If delta_time is positive, it means that the system clock is - // ahead of our local clock so add delta to the local time to get an - // approximation of the system time. Else if delta time is negative, - // it means that our local clock is ahead of the system clock, so - // return the last local time stored (to avoid time conflicts). - if (*this->delta_time_ >= 0 ) - { - this->get_local_system_time (local_time); - time_out = local_time + static_cast<ACE_UINT32> (*this->delta_time_); - } - else - // Return the last local time. Note that this is stored as the - // second field in shared memory. - time_out = *(this->delta_time_ + 1); - return 0; -} - -int -ACE_System_Time::get_master_system_time (ACE_Time_Value &time_out) -{ - ACE_TRACE ("ACE_System_Time::get_master_system_time"); - time_t to; - if (this->get_master_system_time (to) == -1) - return -1; - time_out.sec (to); - return 0; -} - -// Synchronize local system time with the central time server using -// specified mode (currently unimplemented). - -int -ACE_System_Time::sync_local_system_time (ACE_System_Time::Sync_Mode) -{ - ACE_TRACE ("ACE_System_Time::sync_local_system_time"); - ACE_NOTSUP_RETURN (-1); -} - -ACE_END_VERSIONED_NAMESPACE_DECL |