While at it, fix typo in "rounding error" :P
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
((bytes - nic->last_nic_bytes) / 1000000) * 8;
float speedMbps = nic->speedMbps;
- float periodMs = gr->pane->period / 1000;
+ float periodMs = gr->pane->period / 1000.0;
float bits = nic_mbps;
float period_factor = periodMs / 1000;
float period_speed = speedMbps * period_factor;
float pct = (bits / period_speed) * 100;
/* Scaling bps with a narrow time period into a second,
- * potentially suffers from routing errors at higher
+ * potentially suffers from rounding errors at higher
* periods. Eg 104%. Compensate.
*/
if (pct > 100)