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

@@ -8,8 +8,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "core/utils.h"
#include "base/qthelp_url.h"
#include "base/timer.h"
#include "base/concurrent_timer.h"
#include "platform/platform_specific.h"
extern "C" {
@@ -226,7 +224,7 @@ namespace {
timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
const auto seed = 1000LL * static_cast<TimeMs>(ts.tv_sec) + (static_cast<TimeMs>(ts.tv_nsec) / 1000000LL);
const auto seed = 1000LL * static_cast<crl::time>(ts.tv_sec) + (static_cast<crl::time>(ts.tv_nsec) / 1000000LL);
#endif
srand((uint32)(seed & 0xFFFFFFFFL));
}
@@ -431,19 +429,6 @@ namespace ThirdParty {
}
}
bool checkms() {
if (crl::adjust_time()) {
base::Timer::Adjust();
base::ConcurrentTimerEnvironment::Adjust();
return true;
}
return false;
}
TimeMs getms(bool checked) {
return crl::time();
}
uint64 msgid() {
#ifdef Q_OS_WIN
LARGE_INTEGER li;