code: func (ts *timerSet) check(now time.Time) error {
  	for i, t := range ts.ts {
  		if now.After(t.deadline) {
  			ts.ts = append(ts.ts[:i], ts.ts[:i+1]...)
  			if t.cb != nil {
  				logf(logTypeHandshake, "Timer %s expired [%v > %v]", t.label, now, t.deadline)
  				cb := t.cb
  				t.cb = nil
  				err := cb()
  				if err != nil {
  					return err
  				}
  			}
  		} else {
  			break
  		}
  	}
  	return nil
  }
docs: // TODO(ekr@rtfm.com): optimize this now that the list is sorted.
  // We should be able to do just one list manipulation, as long
  // as we're careful about how we handle inserts during callbacks.