Use proper 64-bit integer arithmetic for Hz calculation
authorTobias Jakobi <tjakobi@math.uni-bielefeld.de>
Wed, 1 Feb 2017 20:48:50 +0000 (21:48 +0100)
committerIan Kelling <ian@iankelling.org>
Wed, 1 Feb 2017 23:31:29 +0000 (15:31 -0800)
The current code uses double floats, which makes no sense since
time differences are always integer and never fractional.

Also fix up the averaging code a bit.

This fixes some spurious wrong Hz values reported for
my Logitech Rumblepad 2.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>

No differences found