mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 07:58:59 +02:00
Rounding numbers
This commit is contained in:
parent
a1ba36d543
commit
62c882b788
1 changed files with 4 additions and 4 deletions
|
@ -113,20 +113,20 @@ PerformanceWarning::~PerformanceWarning() {
|
||||||
if ((_alwaysDisplay || _renderWarningsOn) && elapsedmsec > 1) {
|
if ((_alwaysDisplay || _renderWarningsOn) && elapsedmsec > 1) {
|
||||||
if (elapsedmsec > 1000) {
|
if (elapsedmsec > 1000) {
|
||||||
double elapsedsec = (end - _start) / 1000000.0;
|
double elapsedsec = (end - _start) / 1000000.0;
|
||||||
qDebug("%s took %lf seconds %s\n", _message, elapsedsec, (_alwaysDisplay ? "" : "WARNING!") );
|
qDebug("%s took %.2lf seconds %s\n", _message, elapsedsec, (_alwaysDisplay ? "" : "WARNING!") );
|
||||||
} else {
|
} else {
|
||||||
if (_suppressShortTimings) {
|
if (_suppressShortTimings) {
|
||||||
if (elapsedmsec > 10) {
|
if (elapsedmsec > 10) {
|
||||||
qDebug("%s took %lf milliseconds %s\n", _message, elapsedmsec,
|
qDebug("%s took %.1lf milliseconds %s\n", _message, elapsedmsec,
|
||||||
(_alwaysDisplay || (elapsedmsec < 10) ? "" : "WARNING!"));
|
(_alwaysDisplay || (elapsedmsec < 10) ? "" : "WARNING!"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
qDebug("%s took %lf milliseconds %s\n", _message, elapsedmsec,
|
qDebug("%s took %.2lf milliseconds %s\n", _message, elapsedmsec,
|
||||||
(_alwaysDisplay || (elapsedmsec < 10) ? "" : "WARNING!"));
|
(_alwaysDisplay || (elapsedmsec < 10) ? "" : "WARNING!"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (_alwaysDisplay) {
|
} else if (_alwaysDisplay) {
|
||||||
qDebug("%s took %lf milliseconds\n", _message, elapsedmsec);
|
qDebug("%s took %.2lf milliseconds\n", _message, elapsedmsec);
|
||||||
}
|
}
|
||||||
// if the caller gave us a pointer to store the running total, track it now.
|
// if the caller gave us a pointer to store the running total, track it now.
|
||||||
if (_runningTotal) {
|
if (_runningTotal) {
|
||||||
|
|
Loading…
Reference in a new issue