mirror of
https://github.com/streetturtle/awesome-wm-widgets.git
synced 2024-11-17 07:49:09 +01:00
net-speed-widget: fix speed calculation
need to divide by time
This commit is contained in:
parent
7ecaccf85f
commit
c4606372b3
1 changed files with 2 additions and 2 deletions
|
@ -104,8 +104,8 @@ local function worker(user_args)
|
|||
if i%2 == 0 then cur_tx = cur_tx + cur_vals[i] end
|
||||
end
|
||||
|
||||
local speed_rx = cur_rx - prev_rx
|
||||
local speed_tx = cur_tx - prev_tx
|
||||
local speed_rx = (cur_rx - prev_rx) / timeout
|
||||
local speed_tx = (cur_tx - prev_tx) / timeout
|
||||
|
||||
widget:set_rx_text(convert_to_h(speed_rx))
|
||||
widget:set_tx_text(convert_to_h(speed_tx))
|
||||
|
|
Loading…
Reference in a new issue