// ContainsWithin returns true if the AlgorandBuffer contains the given data within time.
// The polling interval determines how often the endpoint is pinged for new data.
ContainsWithin returns true if the AlgorandBuffer contains the given data within time.
The polling interval determines how often the endpoint is pinged for new data.
// ContainsWithin returns true if the AlgorandBuffer contains the given data within time . // The polling interval determines how often the endpoint is pinged for new data .
func (ab *AlgorandBuffer) ContainsWithin(m map[string]string, t time.Duration, pollingInterval time.Duration) bool {
	if len(m) > client.GlobalBytes {
		return false
	}
	now := time.Now()
	for time.Now().Sub(now) < t {
		ctx, cancel := context.WithTimeout(context.Background(), t-time.Now().Sub(now))
		data, err := ab.GetBuffer(ctx)
		cancel()
		if err != nil {
			return false
		}
		if mapContainsMap(data, m) {
			return true
		}
		time.Sleep(pollingInterval)
	}
	return false
}
func ( ab * AlgorandBuffer ) ContainsWithin ( m map [ string ] string , t time . Duration , pollingInterval time . Duration ) bool { if len ( m ) > client . GlobalBytes { return false } now := time . Now ( ) for time . Now ( ) . Sub ( now ) < t { ctx , cancel := context . WithTimeout ( context . Background ( ) , t - time . Now ( ) . Sub ( now ) ) data , err := ab . GetBuffer ( ctx ) cancel ( ) if err != nil { return false } if mapContainsMap ( data , m ) { return true } time . Sleep ( pollingInterval ) } return false }
ContainsWithin returns true if the AlgorandBuffer contains the given data within time.
ContainsWithin returns true if the AlgorandBuffer contains the given data within time .
// only remaining time left