optimized time fetch during flush

This commit is contained in:
Jeff Hill
2003-04-07 16:06:17 +00:00
parent 9519c2646a
commit 12efe1ec2b
8 changed files with 24 additions and 20 deletions

View File

@@ -29,13 +29,13 @@
#include "comBuf.h"
#include "errlog.h"
bool comBuf::flushToWire ( wireSendAdapter & wire )
bool comBuf::flushToWire ( wireSendAdapter & wire, const epicsTime & currentTime )
{
unsigned index = this->nextReadIndex;
unsigned finalIndex = this->commitIndex;
while ( index < finalIndex ) {
unsigned nBytes = wire.sendBytes (
&this->buf[index], finalIndex - index );
&this->buf[index], finalIndex - index, currentTime );
if ( nBytes == 0u ) {
this->nextReadIndex = index;
return false;