31 |
#include <sys/time.h> |
#include <sys/time.h> |
32 |
#include <signal.h> |
#include <signal.h> |
33 |
#include <strings.h> |
#include <strings.h> |
34 |
|
#include <string.h> |
35 |
|
#include <stdlib.h> |
36 |
|
|
37 |
namespace |
namespace |
38 |
{ |
{ |
1229 |
// |
// |
1230 |
// Increase the elapsed number of milliseconds. |
// Increase the elapsed number of milliseconds. |
1231 |
// |
// |
1232 |
int elapsed_ms = ( elapsed_time.tv_sec * MILLISECONDS_PER_SEC + |
unsigned int elapsed_ms = ( elapsed_time.tv_sec * MILLISECONDS_PER_SEC + |
1233 |
elapsed_time.tv_usec / MICROSECONDS_PER_MS ) ; |
elapsed_time.tv_usec / MICROSECONDS_PER_MS ) ; |
1234 |
// |
// |
1235 |
// If more than msTimeout milliseconds have elapsed while |
// If more than msTimeout milliseconds have elapsed while |
1292 |
// |
// |
1293 |
dataBuffer.reserve( numOfBytes ) ; |
dataBuffer.reserve( numOfBytes ) ; |
1294 |
// |
// |
1295 |
for(int i=0; i<numOfBytes; ++i) |
for(unsigned int i=0; i<numOfBytes; ++i) |
1296 |
{ |
{ |
1297 |
dataBuffer.push_back( ReadByte(msTimeout) ) ; |
dataBuffer.push_back( ReadByte(msTimeout) ) ; |
1298 |
} |
} |