Re: *** GMX Spamverdacht *** Re: [dev] daemon for DWM

From: Markus Wichmann <>
Date: Sun, 21 Jul 2013 17:20:45 +0200

On Sun, Jul 21, 2013 at 03:44:15PM +0200, Silvan Jegen wrote:
> > You could also save the old values from the previous run, so you would
> > only need to call parse_netdev() once per run, not twice.
> Wouldn't that mean that I would have to save the old value in a
> persistent file on disk? Reading and writing the file would add a
> significant amount of code whose only advantage it would be to not
> have to run this function twice. I do not think that would be worth
> it.

No, I meant you could make oldrec and oldsent static and then just read
newrec and newsent when the function is called. And at its end update
oldrec and oldsent with the new values. That way the one second sleep
woul be put outside this function into the main loop.

> Thanks again for your comments!

You're welcome. Good to know people care about (and for) those comments,
because I don't always know whether I'm helpful or just patronizing.

Received on Sun Jul 21 2013 - 17:20:45 CEST

This archive was generated by hypermail 2.3.0 : Sun Jul 21 2013 - 17:24:07 CEST