From ffb51b4a39bba2da238f54378dca0155e8064de8 Mon Sep 17 00:00:00 2001 From: "Joerg T. (Mic92)" Date: Thu, 18 Aug 2011 19:59:11 +0200 Subject: [PATCH] [net] Fix whitespace --- widgets/net.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/widgets/net.lua b/widgets/net.lua index 3d92991..59ac52d 100644 --- a/widgets/net.lua +++ b/widgets/net.lua @@ -47,15 +47,15 @@ local function worker(format) local sysnet = helpers.pathtotable("/sys/class/net/" .. name) args["{"..name.." carrier}"] = tonumber(sysnet.carrier) or 0 - local now = os.time() + local now = os.time() if nets[name] == nil then -- Default values on the first run nets[name] = {} helpers.uformat(args, name .. " down", 0, unit) helpers.uformat(args, name .. " up", 0, unit) else -- Net stats are absolute, substract our last reading - local interval = now - nets[name].time - if interval < 0 then interval = 1 end + local interval = now - nets[name].time + if interval < 0 then interval = 1 end local down = (recv - nets[name][1]) / interval local up = (send - nets[name][2]) / interval @@ -64,7 +64,7 @@ local function worker(format) helpers.uformat(args, name .. " up", up, unit) end - nets[name].time = now + nets[name].time = now -- Store totals nets[name][1] = recv