// SetReceiveTimeout allows to set a receive timeout on the socket
774629
func (s *NetlinkSocket) SetReceiveTimeout(timeout *unix.Timeval) error {
	// Set a read timeout of SOCKET_READ_TIMEOUT, this will allow the Read to periodically unblock and avoid that a routine
	// remains stuck on a recvmsg on a closed fd
	return unix.SetsockoptTimeval(int(s.fd), unix.SOL_SOCKET, unix.SO_RCVTIMEO, timeout)
}
341999
func (s *RegisterJobDefinitionInput) SetTimeout(v *JobTimeout) *RegisterJobDefinitionInput {
	s.Timeout = v
	return s
}
407772
func (f *Fibre) SetReadTimeout(wait string) {
	f.rtimeout, _ = time.ParseDuration(wait)
}
1320642
func (c *Client) SetTimeout(t int) *Client {
	c.Timeout = t
	return c
}
270892
func ignoreReceives(ws *websocket.Conn, timeout time.Duration) {
	defer util.HandleCrash()
	var data []byte
	for {
		resetTimeout(ws, timeout)
		if err := websocket.Message.Receive(ws, &data); err != nil {
			return
		}
	}
}
877408
func (w *asyncUdsWriter) SetWriteTimeout(d time.Duration) error {
	w.writeTimeout = d
	return nil
}
1030519
func (s *RadiusSettings) SetRadiusTimeout(v int64) *RadiusSettings {
	s.RadiusTimeout = &v
	return s
}
81762
func (s *ChangeMessageVisibilityBatchRequestEntry) SetVisibilityTimeout(v int64) *ChangeMessageVisibilityBatchRequestEntry {
	s.VisibilityTimeout = &v
	return s
}
814508
func OptListenerTimeout(d time.Duration) Option {
	return func(h *HCI) error {
		h.listenerTmo = d
		return nil
	}
}
262271
func ShouldEventuallyReceive(t testing.TB, c interface{}, timeouts ...time.Duration) interface{} {
	t.Helper()
	if !isChan(c) {
		t.Fatal("ShouldEventuallyReceive c argument should be a channel")
	}
	v := reflect.ValueOf(c)

	timeout := time.After(500 * time.Millisecond)

	if len(timeouts) > 0 {
		timeout = time.After(timeouts[0])
	}

	recvChan := make(chan reflect.Value)

	go func() {
		v, ok := v.Recv()
		if ok {
			recvChan <- v
		}
	}()

	select {
	case <-timeout:
		t.Fatal(errors.New("timed out waiting for channel to receive"))
	case a := <-recvChan:
		return a.Interface()
	}

	return nil
}
245162
func (o *ClientOptions) SetWriteTimeout(t time.Duration) *ClientOptions {
	o.WriteTimeout = t
	return o
}
288295
func (c PubSubConn) ReceiveWithTimeout(timeout time.Duration) interface{} {
	return c.receiveInternal(ReceiveWithTimeout(c.Conn, timeout))
}
1256941
func (s *FunctionConfiguration) SetTimeout(v int64) *FunctionConfiguration {
	s.Timeout = &v
	return s
}
220705
func (e *Eurekache) SetTimeout(d time.Duration) {
	e.readTimeout = d
	e.writeTimeout = d
}
1253022
func (c *FCGIClient) SetSendTimeout(t time.Duration) error {
	c.sendTimeout = t
	return nil
}
975413
func (c *Client) SetTimeout(duration time.Duration) {
	c.Driver.Timeout = duration
}
423929
func (s *RedshiftSettings) SetConnectionTimeout(v int64) *RedshiftSettings {
	s.ConnectionTimeout = &v
	return s
}