math rules rule
Vladimir Bauer
6 years ago
| 84 | 84 |
|
| 85 | 85 |
var speed float64
|
| 86 | 86 |
if v := math.Round(d.average.Value()); v != 0 {
|
| 87 | |
current := float64(st.Current)
|
| 88 | |
speed = current / (current * time.Duration(v).Seconds())
|
|
87 |
speed = 1 / time.Duration(v).Seconds()
|
| 89 | 88 |
}
|
| 90 | 89 |
|
| 91 | 90 |
d.msg = d.producer(speed)
|