-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed as not planned
Labels
LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolProposal
Milestone
Description
Proposal Details
This is kinda annoying:
delay := time.Duration( float64(baseDelay) * backoffFactor )
It would be nicer if you could just do this:
delay := baseDelay.Scale(backoffFactor)
You could paste this in each package you were needing this:
func scaleDuration(d time.Duration, s float64) time.Duration {
return time.Duration(float64(d) * s)
}
...but probably nicer built into time.Duration?
Have a good day :)
zigo101
Metadata
Metadata
Assignees
Labels
LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolIssues describing a requested change to the Go standard library or x/ libraries, but not to a toolProposal