Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for pollIntervalBase (0.18 sec)

  1. internal/http/server.go

    	if err != nil {
    		return err
    	}
    
    	pollIntervalBase := time.Millisecond
    	nextPollInterval := func() time.Duration {
    		// Add 10% jitter.
    		interval := pollIntervalBase + time.Duration(rand.Intn(int(pollIntervalBase/10)))
    		// Double and clamp for next time.
    		pollIntervalBase *= 2
    		if pollIntervalBase > shutdownPollIntervalMax {
    			pollIntervalBase = shutdownPollIntervalMax
    		}
    		return interval
    	}
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Feb 09 21:25:16 GMT 2024
    - 7.7K bytes
    - Viewed (0)
Back to top