diff options
Diffstat (limited to 'client/Client.cpp')
-rw-r--r-- | client/Client.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/client/Client.cpp b/client/Client.cpp index 2075fc2..cf4b3eb 100644 --- a/client/Client.cpp +++ b/client/Client.cpp @@ -54,10 +54,9 @@ void Client::timeFunction() { socket->write(msgToSend); } -void Client::missingRecords() -{ - QSqlQuery queryTimeData; - queryTimeData.exec("SELECT (unix_timestamp(now()) - unix_timestamp(`time`))/60 as delta FROM `tblMain` limit 1"); +void Client::missingRecords() { + QSqlQuery queryTimeData; + queryTimeData.exec("select unix_timestamp(now()) - unix_timestamp(time) as delta from WSdb.tblMain order by time desc limit 1"); queryTimeData.first(); unsigned int secondsSinceLastRecord = queryTimeData.value(0).toInt(); |