func (t *ackTimer) stop() {
	t.mutex.Lock()
	defer t.mutex.Unlock()
	if t.stopFunc != nil {
		t.stopFunc()
		t.stopFunc = nil
	}
}
stops the timer. this is similar to stop() but subsequent start() call
will fail (the timer is no longer usable)
package sctp
import (
	"sync"
	"time"
)
const (
	ackInterval time.Duration = 200 * time.Millisecond
)
type ackTimerObserver interface {
	onAckTimeout()
}
type ackTimer struct {
	observer ackTimerObserver
	interval time.Duration
	stopFunc stopAckTimerLoop
	closed   bool
	mutex    sync.RWMutex
}
type stopAckTimerLoop func()
func newAckTimer(observer ackTimerObserver) *ackTimer {
	return &ackTimer{
		observer: observer,
		interval: ackInterval,
	}
}
func (t *ackTimer) start() bool {
	t.mutex.Lock()
	defer t.mutex.Unlock()
	if t.closed {
		return false
	}
	if t.stopFunc != nil {
		return false
	}
	cancelCh := make(chan struct{})
	go func() {
		timer := time.NewTimer(t.interval)
		select {
		case <-timer.C:
			t.stop()
			t.observer.onAckTimeout()
		case <-cancelCh:
			timer.Stop()
		}
	}()
	t.stopFunc = func() {
		close(cancelCh)
	}
	return true
}