mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
Merge branch 'master' into pu/mp
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <sys/un.h>
|
||||
#include <sys/socket.h>
|
||||
@@ -405,7 +406,7 @@ int CRCInput::messageLoop( bool anyKeyCancels, int timeout )
|
||||
if ( timeout == -1 )
|
||||
timeout = g_settings.timing[SNeutrinoSettings::TIMING_MENU];
|
||||
|
||||
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd( timeout == 0 ? 0xFFFF : timeout);
|
||||
uint64_t timeoutEnd = CRCInput::calcTimeoutEnd(timeout);
|
||||
|
||||
while (doLoop)
|
||||
{
|
||||
@@ -435,7 +436,7 @@ int CRCInput::messageLoop( bool anyKeyCancels, int timeout )
|
||||
if ( anyKeyCancels )
|
||||
doLoop = false;
|
||||
else
|
||||
timeoutEnd = CRCInput::calcTimeoutEnd( timeout );
|
||||
timeoutEnd = CRCInput::calcTimeoutEnd(timeout);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -535,17 +536,15 @@ int CRCInput::checkTimers()
|
||||
return _id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int64_t CRCInput::calcTimeoutEnd(const int timeout_in_seconds)
|
||||
int64_t CRCInput::calcTimeoutEnd(const int _timeout_in_seconds)
|
||||
{
|
||||
return time_monotonic_us() + ((uint64_t)timeout_in_seconds * (uint64_t) 1000000);
|
||||
uint64_t timeout_in_seconds = (_timeout_in_seconds == 0) ? INT_MAX : _timeout_in_seconds;
|
||||
return time_monotonic_us() + (timeout_in_seconds * 1000000);
|
||||
}
|
||||
|
||||
int64_t CRCInput::calcTimeoutEnd_MS(const int timeout_in_milliseconds)
|
||||
{
|
||||
uint64_t timeNow = time_monotonic_us();
|
||||
return ( timeNow + timeout_in_milliseconds * 1000 );
|
||||
return time_monotonic_us() + (timeout_in_milliseconds * 1000);
|
||||
}
|
||||
|
||||
void CRCInput::getMsgAbsoluteTimeout(neutrino_msg_t * msg, neutrino_msg_data_t * data, uint64_t *TimeoutEnd, bool bAllowRepeatLR)
|
||||
|
Reference in New Issue
Block a user