diff options
| author | selsta <selsta@sent.at> | 2021-05-26 00:55:50 +0200 |
|---|---|---|
| committer | selsta <selsta@sent.at> | 2021-05-26 00:55:50 +0200 |
| commit | b2255cfd24afd4ea529824cb716c303d3aa68ef1 (patch) | |
| tree | 24ea5334d52f105947ca5397a2555f1a6c7a8b0c /main.qml | |
| parent | 937cb9825672d07a1917d2d9daf823802ec31d1b (diff) | |
| download | monzero-gui-b2255cfd24afd4ea529824cb716c303d3aa68ef1.tar.gz monzero-gui-b2255cfd24afd4ea529824cb716c303d3aa68ef1.tar.xz monzero-gui-b2255cfd24afd4ea529824cb716c303d3aa68ef1.zip | |
main: use Utils.epoch() for epoch
Diffstat (limited to 'main.qml')
| -rw-r--r-- | main.qml | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -96,7 +96,6 @@ ApplicationWindow { property alias viewState: rootItem.state property string prevSplashText; property bool splashDisplayedBeforeButtonRequest; - property int appEpoch: Math.floor((new Date).getTime() / 1000) property bool themeTransition: false // fiat price conversion @@ -2203,8 +2202,7 @@ ApplicationWindow { function userActivity() { // register user activity - var epoch = Math.floor((new Date).getTime()/1000); - appWindow.userLastActive = epoch; + appWindow.userLastActive = Utils.epoch(); } function checkInUserActivity() { @@ -2214,8 +2212,7 @@ ApplicationWindow { var inputDialogVisible = inputDialog && inputDialog.visible // prompt password after X seconds of inactivity - var epoch = Math.floor((new Date).getTime() / 1000); - var inactivity = epoch - appWindow.userLastActive; + var inactivity = Utils.epoch() - appWindow.userLastActive; if(inactivity < (persistentSettings.lockOnUserInActivityInterval * 60)) return; passwordDialog.onAcceptedCallback = function() { |
