diff --git a/BufferCore.h b/BufferCore.h index c399fbe..e4c73e9 100644 --- a/BufferCore.h +++ b/BufferCore.h @@ -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 diff --git a/TimingCore.cpp b/TimingCore.cpp index dbc791b..b0808db 100644 --- a/TimingCore.cpp +++ b/TimingCore.cpp @@ -49,3 +49,9 @@ long TimePassed( timeval StartTime ) return Duration; } //--------------------------------------------------------------------------- + +bool Timeout( timeval StartTime, long MilliSeconds ) +{ + return ((TimePassed(StartTime) > MilliSeconds)? true : false); +} +//--------------------------------------------------------------------------- diff --git a/TimingCore.h b/TimingCore.h index bd2fe31..003c297 100644 --- a/TimingCore.h +++ b/TimingCore.h @@ -19,6 +19,7 @@ void SetInterval( timeval *Time, long MilliSeconds ); void SetStartTime( timeval *StartTime ); long TimePassed( timeval StartTime ); +bool Timeout( timeval StartTime, long MilliSeconds ); //---------------------------------------------------------------------------