Re: [PATCH libinput 1/2] util: introduce ratelimit helpers

2014-11-05 Thread Peter Hutterer
On Wed, Nov 05, 2014 at 12:30:32PM +0100, David Herrmann wrote: > On Wed, Nov 5, 2014 at 6:11 AM, Peter Hutterer > wrote: > > On Tue, Nov 04, 2014 at 09:35:37AM +0100, David Herrmann wrote: > >> This adds "struct ratelimit" and "ratelimit_test()". It's a very simple > >> rate-limit helper modeled

Re: [PATCH libinput 1/2] util: introduce ratelimit helpers

2014-11-05 Thread David Herrmann
Hi On Wed, Nov 5, 2014 at 6:11 AM, Peter Hutterer wrote: > On Tue, Nov 04, 2014 at 09:35:37AM +0100, David Herrmann wrote: >> This adds "struct ratelimit" and "ratelimit_test()". It's a very simple >> rate-limit helper modeled after Linux' lib/ratelimit.c by Dave Young. >> >> This comes in handy

Re: [PATCH libinput 1/2] util: introduce ratelimit helpers

2014-11-04 Thread Peter Hutterer
On Tue, Nov 04, 2014 at 09:35:37AM +0100, David Herrmann wrote: > This adds "struct ratelimit" and "ratelimit_test()". It's a very simple > rate-limit helper modeled after Linux' lib/ratelimit.c by Dave Young. > > This comes in handy to limit log-messages in possible busy loops etc.. > > Signed-o

[PATCH libinput 1/2] util: introduce ratelimit helpers

2014-11-04 Thread David Herrmann
This adds "struct ratelimit" and "ratelimit_test()". It's a very simple rate-limit helper modeled after Linux' lib/ratelimit.c by Dave Young. This comes in handy to limit log-messages in possible busy loops etc.. Signed-off-by: David Herrmann --- src/libinput-util.c | 48 +++