lkml.org 
[lkml]   [2018]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 8/8] HID: logitech: Enable high-resolution scrolling on Logitech mice
On Wed, Nov 21, 2018 at 10:35 PM Peter Hutterer
<peter.hutterer@who-t.net> wrote:
>
> This patch is a combinations of the now-reverted commits 1ff2e1a44e0,
> d56ca9855bf9, 5fe2ccbef9d, 044ee89028 together with some extra bits for the
> directional and timeout-based reset.

Instead of using an actual timer (which is quite expensive), how about
just saving the "last time" data along with the remainder?

We have a fairly low-overhead 'sched_clock()' function that gives a
clock approximation in nanoseconds (64 bits). Note that it doesn't
actually give nanosecond precision - it might fall back to jiffies for
hardware that doesn't have anything better, but for timeouts on the
order of a second, it's fine.

Linus

\
 
 \ /
  Last update: 2018-11-22 18:07    [W:0.128 / U:36.784 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site