daemonc/remotecontrol.cpp: use time_monotonic_ms for zap_completion_timeout

Origin commit data
------------------
Branch: ni/coolstream
Commit: b0f20009be
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-02-27 (Mon, 27 Feb 2012)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2012-02-27 19:28:01 +04:00
parent 65fddf13e8
commit d751d21075
3 changed files with 4 additions and 13 deletions

View File

@@ -41,6 +41,7 @@
#include <driver/encoding.h> #include <driver/encoding.h>
#include <driver/record.h> #include <driver/record.h>
#include <driver/abstime.h>
#include "libdvbsub/dvbsub.h" #include "libdvbsub/dvbsub.h"
#include "libtuxtxt/teletext.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_Zapit->zapTo_serviceID_NOWAIT(current_channel_id );
//g_Sectionsd->setServiceChanged(current_channel_id, false); //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; return messages_return::handled;
} }
@@ -684,7 +685,7 @@ void CRemoteControl::zapTo_ChannelID(const t_channel_id channel_id, const std::s
needs_nvods = false; needs_nvods = false;
director_mode = 0; director_mode = 0;
uint64_t now = getcurrenttime(); uint64_t now = time_monotonic_ms();
if ( zap_completion_timeout < now ) if ( zap_completion_timeout < now )
{ {
g_InfoViewer->chanready = 0; 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_Zapit->zapTo_serviceID_NOWAIT(channel_id);
//g_Sectionsd->setServiceChanged( current_channel_id, false ); //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 ); g_RCInput->killTimer( current_programm_timer );
} }
} }

View File

@@ -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 CTZChangeNotifier::changeNotify(const neutrino_locale_t, void * Data)
{ {
bool found = false; bool found = false;

View File

@@ -37,8 +37,6 @@
#include <string> #include <string>
uint64_t getcurrenttime();
class CGenericMenuActivate class CGenericMenuActivate
{ {
private: private: