// AfterFunc waits for the duration to elapse and then calls f in its own goroutine.
// It returns a Timer that can be used to cancel the call using its Stop method.
//
// A negative or zero duration fires the timer immediately.
AfterFunc waits for the duration to elapse and then calls f in its own goroutine.
It returns a Timer that can be used to cancel the call using its Stop method.

A negative or zero duration fires the timer immediately.
// AfterFunc waits for the duration to elapse and then calls f in its own goroutine . // It returns a Timer that can be used to cancel the call using its Stop method . // // A negative or zero duration fires the timer immediately .
func (s *Simulator) AfterFunc(d time.Duration, f func()) *Timer {
	s.Lock()
	defer s.Unlock()
	return s.newTimerFunc(s.now.Add(d), f)
}
func ( s * Simulator ) AfterFunc ( d time . Duration , f func ( ) ) * Timer { s . Lock ( ) defer s . Unlock ( ) return s . newTimerFunc ( s . now . Add ( d ) , f ) }
AfterFunc waits for the duration to elapse and then calls f in its own goroutine.
AfterFunc waits for the duration to elapse and then calls f in its own goroutine .