code: func (e *Ewma) Update(next float64, timestamp time.Time) float64 {
  	if timestamp.Before(e.lastTimestamp) || timestamp == e.lastTimestamp {
  		return e.Current
  	}
  
  	if e.lastTimestamp.IsZero() {
  		// Ignore the first sample
  		e.lastTimestamp = timestamp
  		return e.Current
  	}
  
  	timeDelta := timestamp.Sub(e.lastTimestamp)
  	e.lastTimestamp = timestamp
  
  	e.Current = e.count(next, timeDelta)
  	return e.Current
  }
docs: // Update moving average with the value, using given time as weight
  //
  // Returns updated moving avarage.