2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35: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

@@ -130,12 +130,12 @@ namespace {
namespace {
TimeMs _lastUserAction = 0;
crl::time _lastUserAction = 0;
} // namespace
void psUserActionDone() {
_lastUserAction = getms(true);
_lastUserAction = crl::now();
EventFilter::getInstance()->setSessionLoggedOff(false);
}
@@ -145,10 +145,10 @@ bool psIdleSupported() {
return GetLastInputInfo(&lii);
}
TimeMs psIdleTime() {
crl::time psIdleTime() {
LASTINPUTINFO lii;
lii.cbSize = sizeof(LASTINPUTINFO);
return GetLastInputInfo(&lii) ? (GetTickCount() - lii.dwTime) : (getms(true) - _lastUserAction);
return GetLastInputInfo(&lii) ? (GetTickCount() - lii.dwTime) : (crl::now() - _lastUserAction);
}
QStringList psInitLogs() {
@@ -201,12 +201,12 @@ void psDoCleanup() {
namespace {
QRect _monitorRect;
TimeMs _monitorLastGot = 0;
crl::time _monitorLastGot = 0;
} // namespace
QRect psDesktopRect() {
auto tnow = getms();
auto tnow = crl::now();
if (tnow > _monitorLastGot + 1000LL || tnow < _monitorLastGot) {
_monitorLastGot = tnow;
HMONITOR hMonitor = MonitorFromWindow(App::wnd()->psHwnd(), MONITOR_DEFAULTTONEAREST);