2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +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

@@ -32,7 +32,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
namespace {
constexpr auto kAutoLockTimeoutLateMs = TimeMs(3000);
constexpr auto kAutoLockTimeoutLateMs = crl::time(3000);
constexpr auto kLegacyCallsPeerToPeerNobody = 4;
} // namespace
@@ -470,7 +470,7 @@ void AuthSession::moveSettingsFrom(AuthSessionSettings &&other) {
}
}
void AuthSession::saveSettingsDelayed(TimeMs delay) {
void AuthSession::saveSettingsDelayed(crl::time delay) {
Expects(this == &Auth());
_saveDataTimer.callOnce(delay);
@@ -483,7 +483,7 @@ void AuthSession::checkAutoLock() {
}
Core::App().checkLocalTime();
auto now = getms(true);
auto now = crl::now();
auto shouldLockInMs = Global::AutoLock() * 1000LL;
auto idleForMs = psIdleTime();
auto notPlayingVideoForMs = now - settings().lastTimeVideoPlayedAt();
@@ -496,7 +496,7 @@ void AuthSession::checkAutoLock() {
}
}
void AuthSession::checkAutoLockIn(TimeMs time) {
void AuthSession::checkAutoLockIn(crl::time time) {
if (_autoLockTimer.isActive()) {
auto remain = _autoLockTimer.remainingTime();
if (remain > 0 && remain <= time) return;