diff --git a/src/daemonc/remotecontrol.cpp b/src/daemonc/remotecontrol.cpp index e80b001f5..fa246bef1 100644 --- a/src/daemonc/remotecontrol.cpp +++ b/src/daemonc/remotecontrol.cpp @@ -41,6 +41,7 @@ #include #include +#include #include "libdvbsub/dvbsub.h" #include "libtuxtxt/teletext.h" @@ -123,7 +124,7 @@ int CRemoteControl::handleMsg(const neutrino_msg_t msg, neutrino_msg_data_t data g_Zapit->zapTo_serviceID_NOWAIT(current_channel_id ); //g_Sectionsd->setServiceChanged(current_channel_id, false); - zap_completion_timeout = getcurrenttime() + 2 * (int64_t) 1000000; + zap_completion_timeout = time_monotonic_ms() + 2 * (int64_t) 1000; return messages_return::handled; } @@ -684,7 +685,7 @@ void CRemoteControl::zapTo_ChannelID(const t_channel_id channel_id, const std::s needs_nvods = false; director_mode = 0; - uint64_t now = getcurrenttime(); + uint64_t now = time_monotonic_ms(); if ( zap_completion_timeout < now ) { g_InfoViewer->chanready = 0; @@ -697,7 +698,7 @@ void CRemoteControl::zapTo_ChannelID(const t_channel_id channel_id, const std::s g_Zapit->zapTo_serviceID_NOWAIT(channel_id); //g_Sectionsd->setServiceChanged( current_channel_id, false ); - zap_completion_timeout = now + 2 * (int64_t) 1000000; + zap_completion_timeout = now + 2 * (int64_t) 1000; g_RCInput->killTimer( current_programm_timer ); } } diff --git a/src/system/setting_helpers.cpp b/src/system/setting_helpers.cpp index 2cfa96aa5..5190cdcb6 100644 --- a/src/system/setting_helpers.cpp +++ b/src/system/setting_helpers.cpp @@ -532,14 +532,6 @@ std::string CNetAdapter::getMacAddr(void) } } -uint64_t getcurrenttime() -{ - struct timeval tv; - gettimeofday( &tv, NULL ); - return (uint64_t) tv.tv_usec + (uint64_t)((uint64_t) tv.tv_sec * (uint64_t) 1000000); -} - - bool CTZChangeNotifier::changeNotify(const neutrino_locale_t, void * Data) { bool found = false; diff --git a/src/system/setting_helpers.h b/src/system/setting_helpers.h index 2224bebaa..1229ba765 100644 --- a/src/system/setting_helpers.h +++ b/src/system/setting_helpers.h @@ -37,8 +37,6 @@ #include -uint64_t getcurrenttime(); - class CGenericMenuActivate { private: