3 // timeSorter implements sort.Interface to allow a slice of timestamps to
5 type TimeSorter []uint64
7 // Len returns the number of timestamps in the slice. It is part of the
8 // sort.Interface implementation.
9 func (s TimeSorter) Len() int {
13 // Swap swaps the timestamps at the passed indices. It is part of the
14 // sort.Interface implementation.
15 func (s TimeSorter) Swap(i, j int) {
16 s[i], s[j] = s[j], s[i]
19 // Less returns whether the timstamp with index i should sort before the
20 // timestamp with index j. It is part of the sort.Interface implementation.
21 func (s TimeSorter) Less(i, j int) bool {