Brunet.Messaging.ReqrepManager.RequestState.IsTimeToAct C# (CSharp) Method

IsTimeToAct() public method

public IsTimeToAct ( System.DateTime now ) : bool
now System.DateTime
return bool
     public bool IsTimeToAct(DateTime now) {
       TimeSpan timeout = _ackers == null ? _timeout : _ack_timeout;
       if( now - _req_date > timeout ) {
         _timeouts--;
         if( _ackers != null ) {
           if( _timeouts < 0 ) {
             //Now, the ACK has timed out, reset them:
             _ackers = null;
             _timeouts = _MAX_RESENDS;
           }
         }
         return true;
       }
       return false;
     }
   }