daemonc/remotecontrol.cpp: use time_monotonic_ms for zap_completion_timeout

This commit is contained in:
[CST] Focus
2012-02-27 19:28:01 +04:00
parent 6e62b52feb
commit b0f20009be
3 changed files with 4 additions and 13 deletions

View File

@@ -41,6 +41,7 @@
#include <driver/encoding.h>
#include <driver/record.h>
#include <driver/abstime.h>
#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 );
}
}

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 found = false;

View File

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