summaryrefslogtreecommitdiff
path: root/gr-qtgui/src/lib/WaterfallDisplayPlot.cc
diff options
context:
space:
mode:
authorTom Rondeau2011-01-23 12:52:07 -0500
committerTom Rondeau2011-01-23 12:52:07 -0500
commitfc806ce5d72807a47d479aecaddb2239722d5fb0 (patch)
treed03e3d412a6ea5124ef9a6063910ff78b28998e9 /gr-qtgui/src/lib/WaterfallDisplayPlot.cc
parent82c9301797aae0e8355213827b1e6cbfe0648a39 (diff)
downloadgnuradio-fc806ce5d72807a47d479aecaddb2239722d5fb0.tar.gz
gnuradio-fc806ce5d72807a47d479aecaddb2239722d5fb0.tar.bz2
gnuradio-fc806ce5d72807a47d479aecaddb2239722d5fb0.zip
Removing YYYY-mmm-DD from time displayed on Waterfall plot.
Diffstat (limited to 'gr-qtgui/src/lib/WaterfallDisplayPlot.cc')
-rw-r--r--gr-qtgui/src/lib/WaterfallDisplayPlot.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/gr-qtgui/src/lib/WaterfallDisplayPlot.cc b/gr-qtgui/src/lib/WaterfallDisplayPlot.cc
index 694dc86d8..d7421f06e 100644
--- a/gr-qtgui/src/lib/WaterfallDisplayPlot.cc
+++ b/gr-qtgui/src/lib/WaterfallDisplayPlot.cc
@@ -140,6 +140,11 @@ public:
{
timespec lineTime = timespec_add(GetZeroTime(), (-value) * GetSecondsPerLine());
std::string time_str = pt::to_simple_string(pt::from_time_t(lineTime.tv_sec));
+
+ // lops off the YYYY-mmm-DD part of the string
+ int ind = time_str.find(" ");
+ if(ind != std::string::npos)
+ time_str = time_str.substr(ind);
return QwtText(QString("").sprintf("%s.%03ld", time_str.c_str(), lineTime.tv_nsec/1000000));
}
@@ -187,6 +192,11 @@ protected:
{
timespec lineTime = timespec_add(GetZeroTime(), (-p.y()) * GetSecondsPerLine());
std::string time_str = pt::to_simple_string(pt::from_time_t(lineTime.tv_sec));
+
+ // lops off the YYYY-mmm-DD part of the string
+ int ind = time_str.find(" ");
+ if(ind != std::string::npos)
+ time_str = time_str.substr(ind);
QString yLabel(QString("").sprintf("%s.%03ld", time_str.c_str(), lineTime.tv_nsec/1000000));
QwtText t(QString("%1 %2, %3").