prevent negative times
This commit is contained in:
parent
ed3486eb96
commit
b26c479002
1 changed files with 1 additions and 1 deletions
|
@ -222,7 +222,7 @@ double ScStwTimer::getCurrentTime() {
|
||||||
return QDateTime::currentMSecsSinceEpoch() - this->startTime;
|
return QDateTime::currentMSecsSinceEpoch() - this->startTime;
|
||||||
default: {
|
default: {
|
||||||
if(this->state == WAITING || this->state == WON || this->state == LOST)
|
if(this->state == WAITING || this->state == WON || this->state == LOST)
|
||||||
return this->stopTime - this->startTime;
|
return abs(this->stopTime - this->startTime);
|
||||||
else
|
else
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue