mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-29 21:00:06 +00:00
30 lines
662 B
C++
30 lines
662 B
C++
#include <scwx/qt/manager/task_manager.hpp>
|
|
#include <scwx/network/ntp_client.hpp>
|
|
#include <scwx/util/logger.hpp>
|
|
|
|
namespace scwx::qt::manager::TaskManager
|
|
{
|
|
|
|
static const std::string logPrefix_ = "scwx::qt::manager::task_manager";
|
|
static const auto logger_ = scwx::util::Logger::Create(logPrefix_);
|
|
|
|
static std::shared_ptr<network::NtpClient> ntpClient_ {};
|
|
|
|
void Initialize()
|
|
{
|
|
logger_->debug("Initialize");
|
|
|
|
ntpClient_ = network::NtpClient::Instance();
|
|
|
|
ntpClient_->Start();
|
|
ntpClient_->WaitForInitialOffset();
|
|
}
|
|
|
|
void Shutdown()
|
|
{
|
|
logger_->debug("Shutdown");
|
|
|
|
ntpClient_->Stop();
|
|
}
|
|
|
|
} // namespace scwx::qt::manager::TaskManager
|