Ensure the heartbeat has a valid value before the thread starts

This commit is contained in:
Brad Davis 2016-03-09 10:53:01 -08:00
parent a2eb819bc2
commit 80fdef4348

View file

@ -244,6 +244,8 @@ public:
// Set the heartbeat on launch
DeadlockWatchdogThread() {
QTimer* heartbeatTimer = new QTimer();
// Give the heartbeat an initial value
_heartbeat = usecTimestampNow();
connect(heartbeatTimer, &QTimer::timeout, [this] {
_heartbeat = usecTimestampNow();
});