TrinityCore
Loading...
Searching...
No Matches
GameTime Namespace Reference

Functions

time_t GetStartTime ()
 
time_t GetGameTime ()
 
uint32 GetGameTimeMS ()
 
SystemTimePoint GetSystemTime ()
 Current chrono system_clock time point.
 
TimePoint Now ()
 Current chrono steady_clock time point.
 
template<typename Clock >
Clock::time_point GetTime ()
 Current chrono Clock time point.
 
template<>
SystemTimePoint GetTime< std::chrono::system_clock > ()
 
template<>
TimePoint GetTime< std::chrono::steady_clock > ()
 
uint32 GetUptime ()
 Uptime (in secs)
 
tm const * GetDateAndTime ()
 
WowTime const * GetUtcWowTime ()
 
WowTime const * GetWowTime ()
 
void UpdateGameTimers ()
 
template<>
TC_GAME_API SystemTimePoint GetTime< std::chrono::system_clock > ()
 
template<>
TC_GAME_API TimePoint GetTime< std::chrono::steady_clock > ()
 

Function Documentation

◆ GetDateAndTime()

TC_GAME_API tm const * GameTime::GetDateAndTime ( )

Definition at line 96 of file GameTime.cpp.

Referenced by InstanceLockMgr::GetNextResetTime().

◆ GetGameTime()

TC_GAME_API time_t GameTime::GetGameTime ( )

Definition at line 52 of file GameTime.cpp.

Referenced by Player::_LoadQuestStatus(), Battleground::_ProcessJoin(), Battleground::_ProcessOfflineQueue(), World::_UpdateGameTime(), Player::AddBattlegroundQueueId(), Player::AddItemToBuyBackSlot(), Player::AddNewMailDeliverTime(), Player::AddQuest(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::AfterDataLoad(), Creature::AllLootRemovedFromCorpse(), AuctionBotBuyer::BuyAndBidItems(), Player::CalculateCorpseReclaimDelay(), Garrison::Building::CanActivate(), Garrison::CancelBuildingConstruction(), Creature::CanCreatureAttack(), Creature::CanGeneratePickPocketLoot(), WorldSession::CanSpeak(), lfg::LFGQueue::CheckCompatibility(), GameEventMgr::CheckOneGameEvent(), GameEventMgr::CheckOneGameEventConditions(), Map::CheckRespawn(), World::CheckScheduledResetTimes(), PassengerController::ClearSlot(), PlayerAchievementMgr::CompletedAchievement(), GuildAchievementMgr::CompletedAchievement(), Corpse::Corpse(), Item::Create(), Player::Create(), Guild::Create(), World::DailyReset(), Player::DeleteOldCharacters(), CalendarMgr::DeleteOldEvents(), boss_magus_telestra::DoAction(), boss_ignis::boss_ignis_AI::DoAction(), Battleground::EventPlayerLoggedOut(), Pet::FillPetInfo(), Creature::ForcedDespawn(), BugTicket::FormatViewMessageString(), ComplaintTicket::FormatViewMessageString(), SuggestionTicket::FormatViewMessageString(), GetAge(), Player::GetCorpseReclaimDelay(), AzeriteItem::GetCurrentKnowledgeLevel(), BlackMarketEntry::GetExpirationTime(), Guild::Member::GetInactiveDays(), AuctionBotBuyer::GetItemInformation(), Player::GetNextResetTalentsCost(), Creature::GetRespawnTimeEx(), GameObject::GetRespawnTimeEx(), BlackMarketEntry::GetSecondsRemaining(), Group::CountdownInfo::GetTimeLeft(), Creature::GetVendorItemCurrentCount(), WorldSocket::HandleAuthSessionCallback(), ban_commandscript::HandleBanInfoCharacterCommand(), ban_commandscript::HandleBanInfoHelper(), WorldSession::HandleCalendarAddEvent(), WorldSession::HandleCalendarCopyEvent(), WorldSession::HandleCalendarEventSignup(), WorldSession::HandleCalendarRsvp(), npc_bg_silvershard_mines_mine_cart::HandleCapture(), WorldSession::HandleChatMessage(), WorldSession::HandleDBQueryBulk(), WorldSession::HandleDuelAccepted(), event_commandscript::HandleEventInfoCommand(), gobject_commandscript::HandleGameObjectTargetCommand(), WorldSession::HandleGetMailList(), list_commandscript::HandleListRespawnsCommand(), WorldSession::HandleLogoutRequestOpcode(), WorldSession::HandleMailCreateTextItem(), WorldSession::HandleMailReturnToSender(), WorldSession::HandleMailTakeItem(), WorldSession::HandleMailTakeMoney(), misc_commandscript::HandleMuteCommand(), npc_commandscript::HandleNpcInfoCommand(), WorldSession::HandlePetRename(), misc_commandscript::HandlePInfoCommand(), Battlefield::HandlePlayerEnterZone(), WorldSession::HandleQueryNextMailTime(), WorldSession::HandleReclaimCorpse(), WorldSession::HandleSetPvP(), WorldSession::HandleTextEmoteOpcode(), WorldSession::HandleTogglePvP(), WorldSession::HandleUndeleteCooldownStatusCallback(), World::HasRecentlyDisconnected(), Player::HasSummonPending(), Player::IncreaseResetTalentsCostAndCounters(), lfg::LFGMgr::InitBoot(), World::InitCalendarOldEventsDeletionTime(), World::InitCurrencyResetTime(), World::InitGuildResetTime(), PacketLog::Initialize(), World::InitRandomBGResetTime(), Battlefield::InvitePlayersInZoneToWar(), Battlefield::InvitePlayerToWar(), WorldSession::IsConnectionIdle(), Creature::IsInvisibleDueToDespawn(), Item::IsRefundExpired(), Group::CountdownInfo::IsRunning(), lfg::LFGMgr::JoinLfg(), npc_bg_silvershard_mines_mine_cart::JustAppeared(), BlackMarketMgr::LoadAuctions(), Player::LoadFromDB(), Creature::LoadFromDB(), GameObject::LoadFromDB(), PlayerAchievementMgr::LoadFromDB(), GuildAchievementMgr::LoadFromDB(), QuestObjectiveCriteriaMgr::LoadFromDB(), Pet::LoadPetFromDB(), WorldPackets::Mail::MailListEntry::MailListEntry(), WorldPackets::Mail::MailQueryNextTimeResult::MailNextTimeEntry::MailNextTimeEntry(), CriteriaHandler::ModifierSatisfied(), BattlePets::BattlePetMgr::ModifyName(), npc_chromie_middle::npc_chromie_middleAI::MoveInLineOfSight(), GameEventMgr::NextCheck(), BattlefieldTB::OnBattleEnd(), BattlefieldWG::OnBattleEnd(), BattlefieldTB::OnBattleStart(), BattlefieldWG::OnBattleStart(), battleground_twin_peaks::OnFlagStateChange(), battleground_warsong_gulch::OnFlagStateChange(), go_bells::go_bellsAI::OnGameEvent(), npc_wg_queue::OnGossipHello(), AreaTrigger_at_brewfest::OnTrigger(), AreaTrigger_at_area_52_entrance::OnTrigger(), battleground_strand_of_the_ancients::OnUpdate(), AuctionHouseMgr::PendingAuctionProcess(), Garrison::PlaceBuilding(), Player::Player(), AuctionBotBuyer::PrepareListOfEntry(), Map::ProcessRespawns(), Weather::ReGenerate(), Creature::RemoveCorpse(), Map::RemoveOldCorpses(), Corpse::ResetGhostTime(), World::ResetMonthlyQuests(), WorldSession::ResetTimeOutTime(), World::ResetWeeklyQuests(), GameObject::Respawn(), Map::Respawn(), ObjectMgr::ReturnOrDeleteOldMails(), Pet::SavePetToDB(), Creature::SaveRespawnTime(), GameObject::SaveRespawnTime(), Player::SaveToDB(), Map::ScriptCommandStart(), Map::ScriptsProcess(), Map::ScriptsStart(), WorldSession::SendAuthResponse(), WorldSession::SendLfgBootProposalUpdate(), MailDraft::SendMailTo(), WorldSession::SendPacket(), Player::SendSummonRequestFrom(), instance_vault_of_archavon::instance_vault_of_archavon_InstanceMapScript::SetBossState(), Unit::SetCharmedBy(), CriteriaHandler::SetCriteriaProgress(), Player::SetDailyQuestStatus(), Creature::setDeathState(), World::SetInitialWorldSettings(), GameObject::SetLootState(), GameObject::SetRespawnTime(), Creature::SetRespawnTime(), RestMgr::SetRestFlag(), Player::SetSeasonalQuestStatus(), GameObjectType::NewFlag::SetState(), BattlefieldTB::SetupBattlefield(), BattlefieldWG::SetupBattlefield(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::SpawnInfiniteCorruptor(), Group::CountdownInfo::StartCountdown(), GameEventMgr::StartEvent(), Creature::StartPickPocketRefillTimer(), GameEventMgr::StopEvent(), PassengerController::SummonCreatures(), Player::SummonIfPossible(), Player::SummonPet(), BattlefieldTB::TowerDestroyed(), World::TriggerGuidWarning(), GameEventMgr::Update(), BlackMarketMgr::Update(), Battlefield::Update(), lfg::LFGMgr::Update(), World::Update(), GameObject::Update(), Pet::Update(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::Update(), WorldSession::Update(), Creature::Update(), Player::Update(), go_cheer_speaker::go_cheer_speakerAI::UpdateAI(), npc_high_overlord_saurfang_igb::UpdateAI(), npc_muradin_bronzebeard_igb::UpdateAI(), Channel::UpdateChannelInDB(), Player::UpdateCorpseReclaimDelay(), BattlefieldWG::UpdatedDestroyedTowerCount(), Player::UpdateHonorFields(), SupportMgr::UpdateLastChange(), Guild::Member::UpdateLogoutTime(), Player::UpdateNextMailTimeAndUnreads(), AuctionHouseMgr::UpdatePendingAuctions(), lfg::LFGMgr::UpdateProposal(), Player::UpdatePvP(), Player::UpdatePvPState(), lfg::LFGMgr::UpdateRoleCheck(), World::UpdateSessions(), Player::UpdateSpeakTime(), Creature::UpdateVendorItemCurrentCount(), GameObject::Use(), World::World(), Guild::BankEventLogEntry::WritePacket(), and Guild::EventLogEntry::WritePacket().

◆ GetGameTimeMS()

◆ GetStartTime()

TC_GAME_API time_t GameTime::GetStartTime ( )

Definition at line 47 of file GameTime.cpp.

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

◆ GetSystemTime()

◆ GetTime()

template<typename Clock >
Clock::time_point GameTime::GetTime ( )

Current chrono Clock time point.

Definition at line 73 of file GameTime.cpp.

◆ GetTime< std::chrono::steady_clock >() [1/2]

template<>
TimePoint GameTime::GetTime< std::chrono::steady_clock > ( )

Definition at line 86 of file GameTime.cpp.

References Now().

◆ GetTime< std::chrono::steady_clock >() [2/2]

template<>
TC_GAME_API TimePoint GameTime::GetTime< std::chrono::steady_clock > ( )

Definition at line 86 of file GameTime.cpp.

References Now().

◆ GetTime< std::chrono::system_clock >() [1/2]

template<>
SystemTimePoint GameTime::GetTime< std::chrono::system_clock > ( )

Definition at line 80 of file GameTime.cpp.

References GetSystemTime().

◆ GetTime< std::chrono::system_clock >() [2/2]

template<>
TC_GAME_API SystemTimePoint GameTime::GetTime< std::chrono::system_clock > ( )

Definition at line 80 of file GameTime.cpp.

References GetSystemTime().

◆ GetUptime()

TC_GAME_API uint32 GameTime::GetUptime ( )

Uptime (in secs)

Definition at line 91 of file GameTime.cpp.

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

◆ GetUtcWowTime()

◆ GetWowTime()

◆ Now()

◆ UpdateGameTimers()

void GameTime::UpdateGameTimers ( )