Mercurial > hg > svcore
diff base/RealTime.cpp @ 1036:682d64f05e72
Merge
author | Chris Cannam |
---|---|
date | Mon, 02 Mar 2015 17:21:34 +0000 |
parents | 344c9ea90181 |
children | cc27f35aa75c |
line wrap: on
line diff
--- a/base/RealTime.cpp Mon Mar 02 17:17:59 2015 +0000 +++ b/base/RealTime.cpp Mon Mar 02 17:21:34 2015 +0000 @@ -274,19 +274,25 @@ std::stringstream out; - if (sec >= 3600) { - out << (sec / 3600) << ":"; + if (p->getShowHMS()) { + + if (sec >= 3600) { + out << (sec / 3600) << ":"; + } + + if (sec >= 60) { + out << (sec % 3600) / 60 << ":"; + } + + if (sec >= 10) { + out << ((sec % 60) / 10); + } + + out << (sec % 10); + + } else { + out << sec; } - - if (sec >= 60) { - out << (sec % 3600) / 60 << ":"; - } - - if (sec >= 10) { - out << ((sec % 60) / 10); - } - - out << (sec % 10); int ms = msec(); @@ -319,21 +325,29 @@ { if (*this < RealTime::zeroTime) return "-" + (-*this).toFrameText(fps); + Preferences *p = Preferences::getInstance(); + std::stringstream out; - if (sec >= 3600) { - out << (sec / 3600) << ":"; + if (p->getShowHMS()) { + + if (sec >= 3600) { + out << (sec / 3600) << ":"; + } + + if (sec >= 60) { + out << (sec % 3600) / 60 << ":"; + } + + if (sec >= 10) { + out << ((sec % 60) / 10); + } + + out << (sec % 10); + + } else { + out << sec; } - - if (sec >= 60) { - out << (sec % 3600) / 60 << ":"; - } - - if (sec >= 10) { - out << ((sec % 60) / 10); - } - - out << (sec % 10); int f = nsec / (ONE_BILLION / fps);