code: func (r *Timing) SortedDurations() []time.Duration {
  	r.Mutex.RLock()
  	t := r.LastCachedTime
  	r.Mutex.RUnlock()
  
  	if t+time.Duration(1*time.Second).Nanoseconds() > time.Now().UnixNano() {
  		// don't recalculate if current cache is still fresh
  		return r.CachedSortedDurations
  	}
  
  	var durations byDuration
  	now := time.Now()
  
  	r.Mutex.Lock()
  	defer r.Mutex.Unlock()
  
  	for timestamp, b := range r.Buckets {
  		// TODO: configurable rolling window
  		if timestamp >= now.Unix()-60 {
  			for _, d := range b.Durations {
  				durations = append(durations, d)
  			}
  		}
  	}
  
  	sort.Sort(durations)
  
  	r.CachedSortedDurations = durations
  	r.LastCachedTime = time.Now().UnixNano()
  
  	return r.CachedSortedDurations
  }
docs: // SortedDurations returns an array of time.Duration sorted from shortest
  // to longest that have occurred in the last 60 seconds.