AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
GameTime Namespace Reference

Functions

Seconds GetStartTime ()
 
Seconds GetGameTime ()
 
Milliseconds GetGameTimeMS ()
 
SystemTimePoint GetSystemTime ()
 Current chrono system_clock time point.
 
TimePoint Now ()
 Current chrono steady_clock time point.
 
Seconds GetUptime ()
 Uptime.
 
void UpdateGameTimers ()
 Update all timers.
 

Variables

Seconds const StartTime = GetEpochTime()
 
Seconds GameTime = GetEpochTime()
 
Milliseconds GameMSTime = 0ms
 
SystemTimePoint GameTimeSystemPoint = SystemTimePoint::min()
 
TimePoint GameTimeSteadyPoint = TimePoint::min()
 

Function Documentation

◆ GetGameTime()

AC_GAME_API Seconds GameTime::GetGameTime ( )
39 {
40 return GameTime;
41 }
Definition: GameTime.cpp:22

References GameTime.

Referenced by Unit::_ExitVehicle(), Player::_LoadMail(), Player::_LoadQuestStatus(), Pet::_LoadSpellCooldowns(), Player::_LoadSpellCooldowns(), InstanceSaveMgr::_ResetOrWarnAll(), Player::_SaveCharacter(), Player::_SaveQuestStatus(), Pet::_SaveSpellCooldowns(), Player::_SaveSpellCooldowns(), World::_UpdateGameTime(), InstanceSaveMgr::AddInstanceSave(), Player::AddItemToBuyBackSlot(), Player::AddNewMailDeliverTime(), InstanceMap::AddPlayerToMap(), Player::AddQuest(), World::AddSession_(), anonymous_namespace{BattlegroundSpamProtect.cpp}::AddTime(), Creature::AllLootRemovedFromCorpse(), BanMgr::BanAccount(), BanMgr::BanAccountByPlayerName(), AchievementMgr::BuildAllDataPacket(), AuctionEntry::BuildAuctionInfo(), AuctionHouseObject::BuildListAuctionItems(), Player::CalculateCorpseReclaimDelay(), Creature::CanCreatureAttack(), Creature::CanGeneratePickPocketLoot(), Spell::CheckCast(), lfg::LFGQueue::CheckCompatibility(), GameEventMgr::CheckOneGameEvent(), GameEventMgr::CheckOneGameEventConditions(), spell_botanica_shift_form::spell_botanica_shift_form_AuraScript::CheckProc(), PassengerController::ClearSlot(), AchievementMgr::CompletedAchievement(), Corpse::Corpse(), Player::Create(), Guild::Create(), Unit::DealDamage(), Player::DeleteOldCharacters(), CalendarMgr::DeleteOldEvents(), Unit::Dismount(), npc_high_overlord_saurfang_igb::npc_high_overlord_saurfang_igbAI::DoAction(), npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::DoAction(), boss_the_lich_king::boss_the_lich_kingAI::DoAction(), FlightPathMovementGenerator::DoFinalize(), Spell::EffectCharge(), Spell::EffectDummy(), Spell::EffectLeapBack(), AssistDelayEvent::Execute(), BattlefieldWG::FillInitialWorldStates(), Pet::FillPetInfo(), Creature::ForcedDespawn(), GmTicket::FormatMessageString(), GetAge(), Player::GetCorpseReclaimDelay(), Group::GetDifficultyChangePreventionTime(), Unit::GetDiseasesByCaster(), Item::GetPlayedTime(), Creature::GetRespawnTimeEx(), GameObject::GetRespawnTimeEx(), Creature::GetVendorItemCurrentCount(), go_inconspicuous_landmark::go_inconspicuous_landmark(), WorldSession::HandleAuctionSellItem(), AuraEffect::HandleAuraFeatherFall(), WorldSocket::HandleAuthSessionCallback(), ban_commandscript::HandleBanInfoCharacterCommand(), ban_commandscript::HandleBanInfoHelper(), WorldSession::HandleCalendarAddEvent(), WorldSession::HandleCalendarCopyEvent(), WorldSession::HandleCalendarEventRsvp(), WorldSession::HandleCalendarEventSignup(), WorldSession::HandleCalendarEventStatus(), WorldSession::HandleCalendarGetCalendar(), WorldSession::HandleCalendarUpdateEvent(), BattlegroundIC::HandleCapturedNodes(), WorldSession::HandleDuelAcceptedOpcode(), spell_item_crystal_prison_dummy_dnd::HandleDummy(), Unit::HandleDummyAuraProc(), event_commandscript::HandleEventInfoCommand(), gobject_commandscript::HandleGameObjectTargetCommand(), WorldSession::HandleGetMailList(), instance_commandscript::HandleInstanceListBindsCommand(), instance_commandscript::HandleInstanceUnbindCommand(), BattlegroundIC::HandleKillUnit(), WorldSession::HandleLogoutRequestOpcode(), WorldSession::HandleMailCreateTextItem(), WorldSession::HandleMailReturnToSender(), WorldSession::HandleMailTakeItem(), WorldSession::HandleMailTakeMoney(), WorldSession::HandleMessagechatOpcode(), WorldSession::HandleMoveSplineDoneOpcode(), WorldSession::HandleMoveWorldportAck(), misc_commandscript::HandleMuteCommand(), npc_commandscript::HandleNpcInfoCommand(), WorldSession::HandlePetRename(), misc_commandscript::HandlePInfoCommand(), Battlefield::HandlePlayerEnterZone(), WorldSession::HandlePlayerLoginFromDB(), WorldSession::HandlePlayerLoginToCharInWorld(), WorldSession::HandleQueryNextMailTime(), quest_commandscript::HandleQuestReward(), WorldSession::HandleReclaimCorpseOpcode(), WorldSession::HandleReportLag(), Guild::HandleRoster(), WorldSession::HandleTeleportTimeout(), WorldSession::HandleTextEmoteOpcode(), WorldSession::HandleWorldStateUITimerUpdate(), World::HasRecentlyDisconnected(), BattlegroundMgr::InitAutomaticArenaPointDistribution(), lfg::LFGMgr::InitBoot(), LoginQueryHolder::Initialize(), PacketLog::Initialize(), Battlefield::InvitePlayersInZoneToWar(), Battlefield::InvitePlayerToWar(), Channel::IsBanned(), anonymous_namespace{BattlegroundSpamProtect.cpp}::IsCorrectDelay(), Creature::IsInvisibleDueToDespawn(), Player::IsSummonAsSpectator(), Item::Item(), lfg::LFGMgr::JoinLfg(), npc_simone::npc_simoneAI::JustDied(), Channel::KickOrBan(), boss_the_lich_king::boss_the_lich_kingAI::KilledUnit(), Player::LeaveBattleground(), GameEventMgr::LoadFromDB(), Player::LoadFromDB(), AchievementMgr::LoadFromDB(), GameObject::LoadGameObjectFromDB(), Pet::LoadPetFromDB(), InstanceSaveMgr::LoadResetTimes(), AchievementCriteriaData::Meets(), Unit::Mount(), MotionMaster::MoveFall(), npc_brewfest_keg_reciver::MoveInLineOfSight(), GameEventMgr::NextCheck(), npc_high_overlord_saurfang_igb::npc_high_overlord_saurfang_igbAI::npc_high_overlord_saurfang_igbAI(), npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::npc_muradin_bronzebeard_igbAI(), npc_riggle_bassbait::npc_riggle_bassbaitAI::npc_riggle_bassbaitAI(), npc_ulduar_flames_initial::npc_ulduar_flames_initialAI::npc_ulduar_flames_initialAI(), npc_wg_queue::OnGossipHello(), go_inconspicuous_landmark::OnGossipHello(), npc_riggle_bassbait::OnQuestReward(), AreaTrigger_at_brewfest::OnTrigger(), AreaTrigger_at_area_52_entrance::OnTrigger(), at_ring_of_law::OnTrigger(), instance_ulduar::instance_ulduar_InstanceMapScript::OnUnitDeath(), MovementInfo::OutDebug(), Player::Player(), BattlegroundIC::PostUpdateImpl(), spell_midsummer_ribbon_pole::PrepareAuraScript(), Creature::RemoveCorpse(), Map::RemoveOldCorpses(), MotionTransport::RemovePassenger(), StaticTransport::RemovePassenger(), Corpse::ResetGhostTime(), Player::resetTalents(), Player::resetTalentsCost(), GameObject::Respawn(), Creature::Respawn(), ObjectMgr::ReturnOrDeleteOldMails(), Map::SaveCreatureRespawnTime(), Map::SaveGORespawnTime(), Pet::SavePetToDB(), OutdoorPvPTF::SaveRequiredWorldStates(), GameObject::SaveRespawnTime(), Map::ScriptCommandStart(), Map::ScriptsProcess(), Map::ScriptsStart(), WorldSession::SendAccountDataTimes(), AchievementMgr::SendAchievementEarned(), AuctionHouseMgr::SendAuctionSalePendingMail(), Player::SendBattlefieldWorldStates(), WorldSession::SendBfInvitePlayerToWar(), WorldSession::SendCalendarRaidLockout(), WorldSession::SendCalendarRaidLockoutUpdated(), Player::SendInitialPacketsBeforeAddToMap(), WorldSession::SendLfgBootProposalUpdate(), Player::SendLoot(), MailDraft::SendMailTo(), WorldSession::SendPacket(), WorldSession::SendQueryTimeResponse(), Player::SendRaidInfo(), Player::SetCanFly(), Creature::SetCanFly(), Unit::SetCharmedBy(), Creature::SetCorpseRemoveTime(), AchievementMgr::SetCriteriaProgress(), Player::SetDailyQuestStatus(), instance_blackrock_depths::instance_blackrock_depths_InstanceMapScript::SetData(), instance_trial_of_the_crusader::instance_trial_of_the_crusader_InstanceMapScript::SetData(), instance_vault_of_archavon::instance_vault_of_archavon_InstanceMapScript::SetData(), Creature::setDeathState(), Group::SetDifficultyChangePrevention(), GameEventMgr::SetHolidayEventTime(), World::SetInitialWorldSettings(), GameObject::SetLootGenerationTime(), GameObject::SetLootState(), GmTicket::SetMessage(), Creature::SetPickPocketLootTime(), GameObject::SetRespawnTime(), Creature::SetRespawnTime(), Player::SetRestFlag(), Player::SetRestState(), Player::SetSummonPoint(), OutdoorPvPTF::SetupOutdoorPvP(), boss_the_lich_king::boss_the_lich_kingAI::SpellHit(), GameEventMgr::StartEvent(), GameEventMgr::StopEvent(), PassengerController::SummonCreatures(), Player::SummonIfPossible(), Player::SummonPet(), Player::TeleportTo(), AuctionHouseObject::Update(), GameEventMgr::Update(), InstanceSaveMgr::Update(), Battlefield::Update(), BattlegroundMgr::Update(), Pet::Update(), World::Update(), WorldSession::Update(), lfg::LFGMgr::Update(), GameObject::Update(), Creature::Update(), Player::Update(), npc_high_overlord_saurfang_igb::npc_high_overlord_saurfang_igbAI::UpdateAI(), npc_muradin_bronzebeard_igb::npc_muradin_bronzebeard_igbAI::UpdateAI(), boss_mimiron::boss_mimironAI::UpdateAI(), Player::UpdateCorpseReclaimDelay(), Player::UpdateFFAPvPState(), Player::UpdateHonorFields(), TicketMgr::UpdateLastChange(), Guild::Member::UpdateLogoutTime(), Player::UpdateNextMailTimeAndUnreads(), StaticTransport::UpdatePassengerPositions(), Item::UpdatePlayedTime(), lfg::LFGMgr::UpdateProposal(), Player::UpdatePvP(), Player::UpdatePvPState(), lfg::LFGQueue::UpdateQueueTimers(), lfg::LFGMgr::UpdateRoleCheck(), World::UpdateSessions(), Player::UpdateSpeakTime(), Creature::UpdateVendorItemCurrentCount(), Guild::BankEventLogEntry::WritePacket(), and Guild::EventLogEntry::WritePacket().

◆ GetGameTimeMS()

AC_GAME_API Milliseconds GameTime::GetGameTimeMS ( )
44 {
45 return GameMSTime;
46 }
Milliseconds GameMSTime
Definition: GameTime.cpp:28

References GameMSTime.

Referenced by Creature::_AddCreatureSpellCooldown(), Player::_AddSpellCooldown(), Pet::_SaveSpellCooldowns(), Player::_SaveSpellCooldowns(), GlobalCooldownMgr::AddGlobalCooldown(), BattlegroundQueue::AddGroup(), WorldObject::AddToNotify(), Unit::ApplyDiminishingAura(), Player::ApplyEquipCooldown(), BattlegroundQueue::BattlegroundQueueUpdate(), AuctionHouseObject::BuildListAuctionItems(), Unit::BuildMovementPacket(), BattlegroundQueue::CheckPremadeMatch(), spell_sindragosa_unchained_magic::spell_sindragosa_unchained_magic_AuraScript::CheckProc(), DynamicObject::CreateDynamicObject(), Spell::DoAllEffectOnTarget(), Spell::EffectSanctuary(), Unit::GetDiminishing(), Creature::GetSpellCooldown(), WorldSession::HandleAuctionListItems(), WorldSession::HandleAuctionListOwnerItems(), WorldSession::HandleAuctionListOwnerItemsEvent(), WorldSession::HandleBattlefieldStatusOpcode(), WardenWin::HandleData(), spell_mimiron_p3wx2_laser_barrage::spell_mimiron_p3wx2_laser_barrage_AuraScript::HandleEffectPeriodic(), WorldSession::HandlePlayerLoginFromDB(), WorldSession::HandlePlayerLoginToCharInWorld(), GlobalCooldownMgr::HasGlobalCooldown(), Creature::HasSpellCooldown(), Unit::IncrDiminishing(), BattlegroundQueue::InviteGroupToBG(), Creature::IsSpellProhibited(), Unit::IsUnderLastManaUseEffect(), spell_mimiron_p3wx2_laser_barrage::spell_mimiron_p3wx2_laser_barrage_AuraScript::Load(), spell_gen_turkey_marker::OnPeriodic(), Player::PetSpellInitialize(), BattlegroundQueue::PlayerInvitedToBGUpdateAverageWaitTime(), BattlegroundEY::PostUpdateImpl(), Creature::ProhibitSpellSchool(), Player::RemoveAllSpellCooldown(), Player::RemoveArenaSpellCooldowns(), WardenWin::RequestChecks(), npc_midsummer_torch_target::SelectPosition(), Player::SendInitialSpells(), Unit::SendMonsterMove(), Spell::SendSpellGo(), boss_ignis::boss_ignisAI::SetData(), Spell::TakePower(), World::Update(), GameObject::Update(), BattlegroundSA::UpdateDemolisherSpawns(), lfg::LFGMgr::UpdateRaidBrowser(), GameObject::Use(), GameObject::UseDoorOrButton(), and Player::VehicleSpellInitialize().

◆ GetStartTime()

AC_GAME_API Seconds GameTime::GetStartTime ( )
34 {
35 return StartTime;
36 }
Seconds const StartTime
Definition: GameTime.cpp:25

References StartTime.

Referenced by World::SetInitialWorldSettings(), and World::Update().

◆ GetSystemTime()

AC_GAME_API SystemTimePoint GameTime::GetSystemTime ( )

Current chrono system_clock time point.

49 {
51 }
SystemTimePoint GameTimeSystemPoint
Definition: GameTime.cpp:30

References GameTimeSystemPoint.

Referenced by AchievementGlobalMgr::IsRealmCompleted(), and AchievementGlobalMgr::SetRealmCompleted().

◆ GetUptime()

AC_GAME_API Seconds GameTime::GetUptime ( )

Uptime.

59 {
60 return GameTime - StartTime;
61 }

References StartTime.

Referenced by server_commandscript::HandleServerInfoCommand(), and World::Update().

◆ Now()

AC_GAME_API TimePoint GameTime::Now ( )

Current chrono steady_clock time point.

54 {
56 }
TimePoint GameTimeSteadyPoint
Definition: GameTime.cpp:31

References GameTimeSteadyPoint.

Referenced by WorldSocket::ReadDataHandler().

◆ UpdateGameTimers()

void GameTime::UpdateGameTimers ( )

Update all timers.

64 {
67 GameTimeSystemPoint = system_clock::now();
68 GameTimeSteadyPoint = steady_clock::now();
69 }
Milliseconds GetTimeMS()
Definition: Timer.h:84
Seconds GetEpochTime()
Definition: Timer.h:141

References GameMSTime, GameTimeSteadyPoint, GameTimeSystemPoint, GetEpochTime(), and GetTimeMS().

Referenced by World::_UpdateGameTime().

Variable Documentation

◆ GameMSTime

Milliseconds GameTime::GameMSTime = 0ms

Referenced by GetGameTimeMS(), and UpdateGameTimers().

◆ GameTime

Seconds GameTime::GameTime = GetEpochTime()

Referenced by GetGameTime().

◆ GameTimeSteadyPoint

TimePoint GameTime::GameTimeSteadyPoint = TimePoint::min()

Referenced by Now(), and UpdateGameTimers().

◆ GameTimeSystemPoint

SystemTimePoint GameTime::GameTimeSystemPoint = SystemTimePoint::min()

Referenced by GetSystemTime(), and UpdateGameTimers().

◆ StartTime

Seconds const GameTime::StartTime = GetEpochTime()

Referenced by GetStartTime(), and GetUptime().