예제 #1
0
func (l Line) Duration() time.Duration {
	d := time.NoDuration()
	for _, e := range l.elements {
		d = d.Add(e.Duration())
	}

	return d
}
예제 #2
0
func (l Stack) Duration() time.Duration {
	d := time.NoDuration()
	for _, v := range l.elements {
		if v.Duration().Greater(d) {
			d = v.Duration()
		}
	}

	return d
}