2
0
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:
John Preston
2019-02-19 10:57:53 +04:00
parent d208236994
commit fe618bd652
310 changed files with 1133 additions and 1141 deletions

View File

@@ -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) {