mirror of
https://github.com/go-i2p/go-sam-go.git
synced 2025-07-21 20:20:02 -04:00
14 lines
168 B
Go
14 lines
168 B
Go
![]() |
package stream
|
||
|
|
||
|
import "time"
|
||
|
|
||
|
func minNonzeroTime(a, b time.Time) time.Time {
|
||
|
if a.IsZero() {
|
||
|
return b
|
||
|
}
|
||
|
if b.IsZero() || a.Before(b) {
|
||
|
return a
|
||
|
}
|
||
|
return b
|
||
|
}
|