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

2014-11-06 Thread David Herrmann
Hi On Thu, Nov 6, 2014 at 6:51 AM, Peter Hutterer wrote: > On Wed, Nov 05, 2014 at 01:32:16PM +0100, David Herrmann wrote: >> diff --git a/test/misc.c b/test/misc.c >> index 1512180..aa411ec 100644 >> --- a/test/misc.c >> +++ b/test/misc.c >> @@ -508,6 +508,40 @@ START_TEST(matrix_helpers) >> }

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

2014-11-05 Thread Peter Hutterer
On Wed, Nov 05, 2014 at 01:32:16PM +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 v2 1/2] util: introduce ratelimit helpers

2014-11-05 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 +++