diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2014-08-27 11:14:07 +0200 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2014-08-27 11:19:05 +0200 |
commit | b7ceae72734f2886577c3b7a27b8f134f8051e70 (patch) | |
tree | bcaef14b1657dc4f2aa0c718235bef7c08f1d985 /src/visualizer.cpp | |
parent | 7fdace835b34f7655641f742eaf5fa428ca5248b (diff) |
replace timeval and time_t with boost::posix_time::ptime
Diffstat (limited to 'src/visualizer.cpp')
-rw-r--r-- | src/visualizer.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/visualizer.cpp b/src/visualizer.cpp index 6b19be4f..e405e367 100644 --- a/src/visualizer.cpp +++ b/src/visualizer.cpp @@ -28,8 +28,6 @@ #include <fstream> #include <limits> #include <fcntl.h> -#include <sys/time.h> -#include <unistd.h> #include "global.h" #include "settings.h" @@ -64,7 +62,6 @@ void Visualizer::switchTo() SwitchTo::execute(this); w.clear(); SetFD(); - m_timer = { 0, 0 }; if (m_fifo >= 0) Global::wFooter->setTimeout(WindowTimeout); drawHeader(); @@ -95,7 +92,7 @@ void Visualizer::update() if (data < 0) // no data available in fifo return; - if (m_output_id != -1 && Global::Timer.tv_sec > m_timer.tv_sec+Config.visualizer_sync_interval) + if (m_output_id != -1 && Global::Timer - m_timer > Config.visualizer_sync_interval) { Mpd.DisableOutput(m_output_id); usleep(50000); |