forked from TrueCloudLab/rclone
pacer: add ZeroDelayCalculator
This commit is contained in:
parent
53400d7edc
commit
502226bfc8
1 changed files with 9 additions and 0 deletions
|
@ -104,6 +104,15 @@ func (c *Default) Calculate(state State) time.Duration {
|
|||
return sleepTime
|
||||
}
|
||||
|
||||
// ZeroDelayCalculator is a Calculator that never delays.
|
||||
type ZeroDelayCalculator struct {
|
||||
}
|
||||
|
||||
// Calculate takes the current Pacer state and return the wait time until the next try.
|
||||
func (c *ZeroDelayCalculator) Calculate(state State) time.Duration {
|
||||
return 0
|
||||
}
|
||||
|
||||
// AmazonCloudDrive is a specialized pacer for Amazon Drive
|
||||
//
|
||||
// It implements a truncated exponential backoff strategy with randomization.
|
||||
|
|
Loading…
Reference in a new issue