func (lp *Timer) Handle() float64 {
	switch {
	case lp.finishAt.Before(lp.Time.Add(-deviation)):
		lp.current--
		lp.log.DEBUG.Printf("target charging: slowdown")

	case lp.finishAt.After(lp.Time):
		lp.current++
		lp.log.DEBUG.Printf("target charging: speedup")
	}

	lp.current = math.Max(math.Min(lp.current, float64(lp.maxCurrent)), 0)

	return lp.current
}
// Handle adjusts current up/down to achieve desired target time taking.
Handle adjusts current up/down to achieve desired target time taking.
// Handle adjusts current up / down to achieve desired target time taking .
func (lp *Timer) Handle() float64 {
	switch {
	case lp.finishAt.Before(lp.Time.Add(-deviation)):
		lp.current--
		lp.log.DEBUG.Printf("target charging: slowdown")
	case lp.finishAt.After(lp.Time):
		lp.current++
		lp.log.DEBUG.Printf("target charging: speedup")
	}
	lp.current = math.Max(math.Min(lp.current, float64(lp.maxCurrent)), 0)
	return lp.current
}
func ( lp * Timer ) Handle ( ) float64 { switch { case lp . finishAt . Before ( lp . Time . Add ( - deviation ) ) : lp . current -- lp . log . DEBUG . Printf ( " " ) case lp . finishAt . After ( lp . Time ) : lp . current ++ lp . log . DEBUG . Printf ( " " ) } lp . current = math . Max ( math . Min ( lp . current , float64 ( lp . maxCurrent ) ) , 0 ) return lp . current }
Handle adjusts current up/down to achieve desired target time taking.
Handle adjusts current up / down to achieve desired target time taking .