Minor Update:

- Use Timeout function in SelectableCore
This commit is contained in:
Charl Wentzel
2016-06-02 13:44:30 +02:00
parent ac34066f30
commit 13b0a4736c

View File

@@ -1098,7 +1098,6 @@ int CSelectableCore::Input( const char * IOName, const char * Data, int Len )
bool CSelectableCore::Process() bool CSelectableCore::Process()
{ {
THandle * Handle = NULL; THandle * Handle = NULL;
long Duration = 0;
// Check all handles // Check all handles
Handle = FirstHandle; Handle = FirstHandle;
@@ -1115,8 +1114,7 @@ bool CSelectableCore::Process()
if (Handle->InBuffer && (Handle->InBuffer->Len() > 0)) if (Handle->InBuffer && (Handle->InBuffer->Len() > 0))
{ {
// Check duration since last PortIn // Check duration since last PortIn
Duration = TimePassed( Handle->InStart ); if (Timeout( Handle->InStart, Handle->InTimeout ))
if (Duration > Handle->InTimeout)
{ {
// Process Input // Process Input
ProcessBuffer( Handle, true ); ProcessBuffer( Handle, true );