func (tp *relayTimerPool) Get() *relayTimer {
	timer, ok := tp.pool.Get().(*relayTimer)
	if ok {
		timer.released = false
		return timer
	}

	rt := &relayTimer{
		pool: tp,
	}
	// Go timers are started by default. However, we need to separate creating
	// the timer and starting the timer for use in the relay code paths.
	// To make this work without more locks in the relayTimer, we create a Go timer
	// with a huge timeout so it doesn't run, then stop it so we can start it later.
	rt.timer = time.AfterFunc(time.Duration(math.MaxInt64), rt.OnTimer)
	if !rt.timer.Stop() {
		panic("relayTimer requires timers in stopped state, but failed to stop underlying timer")
	}
	return rt
}
func (tp *relayTimerPool) Get() *relayTimer {
	timer, ok := tp.pool.Get().(*relayTimer)
	if ok {
		timer.released = false
		return timer
	}

	rt := &relayTimer{
		pool: tp,
	}
	
	
	
	
	rt.timer = time.AfterFunc(time.Duration(math.MaxInt64), rt.OnTimer)
	if !rt.timer.Stop() {
		panic("relayTimer requires timers in stopped state, but failed to stop underlying timer")
	}
	return rt
}
func ( tp * relayTimerPool ) Get ( ) * relayTimer { timer , ok := tp . pool . Get ( ) . ( * relayTimer ) if ok { timer . released = false return timer } rt := & relayTimer { pool : tp , } // Go timers are started by default. However, we need to separate creating // the timer and starting the timer for use in the relay code paths. // To make this work without more locks in the relayTimer, we create a Go timer // with a huge timeout so it doesn't run, then stop it so we can start it later. rt . timer = time . AfterFunc ( time . Duration ( math . MaxInt64 ) , rt . OnTimer ) if ! rt . timer . Stop ( ) { panic ( " " ) } return rt }
// Get returns a relay timer that has not started. Timers must be started explicitly
// using the Start function.
Get returns a relay timer that has not started . Timers must be started explicitly using the Start function .