prevent negative times

This commit is contained in:
Dorian Zedler 2020-06-13 18:24:27 +02:00
parent ed3486eb96
commit b26c479002
Signed by: dorian
GPG key ID: 989DE36109AFA354

View file

@ -222,7 +222,7 @@ double ScStwTimer::getCurrentTime() {
return QDateTime::currentMSecsSinceEpoch() - this->startTime;
default: {
if(this->state == WAITING || this->state == WON || this->state == LOST)
return this->stopTime - this->startTime;
return abs(this->stopTime - this->startTime);
else
return -1;
}