Re: [dwm] building an autolock with sinac

From: Christian Dietrich <stettberger_AT_dokucode.de>
Date: Fri, 28 Dec 2007 23:41:53 +0100

* Enno Gottox Boland <gottox_AT_gmail.com> [Dec 28 2007 21:23] wrote:
> Very nice idea. But there are some things I want to note:
>
> ... && argv[i+1])
> very bad idea to test for argv[i+1]. Use "i+1 < argc" instead
yeah, thats right

> while (seconds_idle(d) < wait)
> usleep(500000);
>
> Polling is unneeded here. What do you think about this:
>
> while (seconds_idle(d) < wait)
> sleep(wait - seconds_idle(d));
>
> (maybe you can store seconds_idle(d) in a var to avoid unneeded Xserver polling)

This is also a good idea, thank you for that

> Hmm... I dislike this for-loop. It's unneeded, isn't it :)

Why do you dislike the for-loop?
 
> Nevertheless a very good idea, I like it.

I attached an patched version of sinac.

greetz
  didi

-- 
No documentation is better than bad documentation

Received on Fri Dec 28 2007 - 23:42:01 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:14:26 UTC