mirror of
https://github.com/42wim/matterbridge.git
synced 2024-12-21 10:32:35 +01:00
19 lines
223 B
Go
19 lines
223 B
Go
|
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
|
||
|
}
|