mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Use crl::time/now instead of TimeMs/getms.
This commit is contained in:
@@ -12,6 +12,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "data/data_session.h"
|
||||
#include "data/data_user.h"
|
||||
#include "base/timer.h"
|
||||
#include "base/concurrent_timer.h"
|
||||
#include "core/update_checker.h"
|
||||
#include "core/shortcuts.h"
|
||||
#include "core/sandbox.h"
|
||||
@@ -630,8 +631,13 @@ void Application::forceLogOut(const TextWithEntities &explanation) {
|
||||
}
|
||||
|
||||
void Application::checkLocalTime() {
|
||||
const auto updated = checkms();
|
||||
if (App::main()) App::main()->checkLastUpdate(updated);
|
||||
if (crl::adjust_time()) {
|
||||
base::Timer::Adjust();
|
||||
base::ConcurrentTimerEnvironment::Adjust();
|
||||
if (App::main()) App::main()->checkLastUpdate(true);
|
||||
} else {
|
||||
if (App::main()) App::main()->checkLastUpdate(false);
|
||||
}
|
||||
}
|
||||
|
||||
void Application::stateChanged(Qt::ApplicationState state) {
|
||||
|
Reference in New Issue
Block a user