summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/slack-go/slack/internal/timex/timex.go
blob: 40063f738b3891836a3a5fe4d6bd18cf3d379b7e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package timex

import "time"

// Max returns the maximum duration
func Max(values ...time.Duration) time.Duration {
	var (
		max time.Duration
	)

	for _, v := range values {
		if v > max {
			max = v
		}
	}

	return max
}