Minor Update:
- BufferCore: Set BufSize as class constant - TimingCore: Add new function Timeout()
This commit is contained in:
@@ -20,8 +20,8 @@ class CBuffer
|
||||
{
|
||||
private:
|
||||
// Buffer Definition
|
||||
char * Buffer; // Memory allocated to buffer
|
||||
int BufSize; // Size of allocated buffer
|
||||
char * Buffer; // Memory allocated to buffer
|
||||
const int BufSize; // Size of allocated buffer
|
||||
|
||||
// Buffer pointers
|
||||
int BufStart; // First unread characters on buffer
|
||||
|
||||
@@ -49,3 +49,9 @@ long TimePassed( timeval StartTime )
|
||||
return Duration;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
bool Timeout( timeval StartTime, long MilliSeconds )
|
||||
{
|
||||
return ((TimePassed(StartTime) > MilliSeconds)? true : false);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
void SetInterval( timeval *Time, long MilliSeconds );
|
||||
void SetStartTime( timeval *StartTime );
|
||||
long TimePassed( timeval StartTime );
|
||||
bool Timeout( timeval StartTime, long MilliSeconds );
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user