// returns a time such that t1 < retval < t2. if that inequality is
// impossible, returns the zero time and errNoPossibleBetweenTime
returns a time such that t1 < retval < t2. if that inequality is
impossible, returns the zero time and errNoPossibleBetweenTime
// returns a time such that t1 < retval < t2 . if that inequality is // impossible returns the zero time and errNoPossibleBetweenTime
func betweenTimes(t1, t2 time.Time) (time.Time, error) {
	if t1.Before(t2) {
		diff := t2.Sub(t1)
		return t1.Add(diff / 2), nil
	}
	return zeroTime, errNoPossibleBetweenTime{lt: t1, gt: t2}
}
func betweenTimes ( t1 , t2 time . Time ) ( time . Time , error ) { if t1 . Before ( t2 ) { diff := t2 . Sub ( t1 ) return t1 . Add ( diff / 2 ) , nil } return zeroTime , errNoPossibleBetweenTime { lt : t1 , gt : t2 } }
returns a time such that t1 < retval < t2.
returns a time such that t1 < retval < t2 .