mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Use crl::time/now instead of TimeMs/getms.
This commit is contained in:
@@ -136,11 +136,11 @@ DeclareRefSetting(RecentInlineBots, RecentInlineBots);
|
||||
DeclareSetting(bool, PasswordRecovered);
|
||||
|
||||
DeclareSetting(int32, PasscodeBadTries);
|
||||
DeclareSetting(TimeMs, PasscodeLastTry);
|
||||
DeclareSetting(crl::time, PasscodeLastTry);
|
||||
|
||||
inline bool passcodeCanTry() {
|
||||
if (cPasscodeBadTries() < 3) return true;
|
||||
auto dt = getms(true) - cPasscodeLastTry();
|
||||
auto dt = crl::now() - cPasscodeLastTry();
|
||||
switch (cPasscodeBadTries()) {
|
||||
case 3: return dt >= 5000;
|
||||
case 4: return dt >= 10000;
|
||||
|
Reference in New Issue
Block a user