Hi Marco,

As I'm the one who added this alignment in the first place [1], I
somewhat feel obligated to answer here :-)
At that time, I did not think about nanosleep() being interupted.

Can you describe under which circumstances i3status receives an USR1?
I've never noticed such a behavior...

What would be your preferred solution here? As for me, we must decide on
what we consider more important (the implementation is easy in either
case): The overall number of refreshs? Have nice numbers?

Possible solutions:
1) We could suppress or defer the signal and continue sleeping until the
proper number of seconds have passed. Not what I'd like to do...
2) We could refresh and start with the intervals from there. This
however means that we drop the alignment. This basically amounts to the
code before I changed it.
3) We could refresh, start with the intervals from there and realign
every minute or so. In this case, we have another shorter interval right
before a new minute starts and "ugly" numbers in between.
4) We could refresh and return to the alignment directly afterwards.
That is what happens right now.

As I don't care about an additional refresh once in a while, I'd go for
the nice numbers... What are your opinions?

Cheers,
Gereon

[1]
http://code.stapelberg.de/git/i3status/commit/?id=11757b8105ebebba40c3a94c5d6c5431cc58b3d1

On 03/11/2014 07:12 PM, Marco Hunsicker wrote:
> Hello Michael,
> 
> thanks again for your quick response.
> 
>>> Would it not be more important to enforce that updates happen (roughly)
>>> every 'interval' seconds? Is it really that important to update at the
>>> start of a new minute anyway?
> 
>> I don’t understand why you are asking which behavior is more
>> important. Can’t we fix this problem properly and have both?
> 
> Well, sometimes there is behavior for no good reason and if I touch the
> code anyway, I might as well get rid of the alignment.
> 
> But if it should stay there, fine with me. I will forward a patch for
> review. Thanks.
> 
> Cheers,
>   Marco

-- 
Email: gereon.kre...@rwth-aachen.de
Mobil: 01520 / 9844454
Adalbertsteinweg 1b, 52070 Aachen

Attachment: 0x78359F29.asc
Description: application/pgp-keys

Reply via email to