summaryrefslogtreecommitdiff
path: root/gr-qtgui/lib/qtgui_time_sink_c.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gr-qtgui/lib/qtgui_time_sink_c.cc')
-rw-r--r--gr-qtgui/lib/qtgui_time_sink_c.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gr-qtgui/lib/qtgui_time_sink_c.cc b/gr-qtgui/lib/qtgui_time_sink_c.cc
index e5c4cd7d6..207d4a924 100644
--- a/gr-qtgui/lib/qtgui_time_sink_c.cc
+++ b/gr-qtgui/lib/qtgui_time_sink_c.cc
@@ -86,7 +86,7 @@ qtgui_time_sink_c::initialize()
// initialize update time to 10 times a second
set_update_time(0.1);
- timespec_reset(&d_last_time);
+ d_last_time = 0;
}
@@ -150,6 +150,7 @@ qtgui_time_sink_c::work (int noutput_items,
// If we have enough input for one full plot, do it
if(datasize >= resid) {
+ d_current_time = gruel::high_res_timer_now();
// Fill up residbufs with d_size number of items
for(n = 0; n < d_nconnections; n+=2) {
@@ -161,8 +162,7 @@ qtgui_time_sink_c::work (int noutput_items,
}
// Update the plot if its time
- d_current_time = get_highres_clock();
- if(diff_timespec(d_current_time, d_last_time) > d_update_time) {
+ if(gruel::high_res_timer_now() - d_last_time > d_update_time) {
d_last_time = d_current_time;
d_qApplication->postEvent(d_main_gui,
new TimeUpdateEvent(d_residbufs, d_size));