Add timestamp filter interpreter

This CL lets the gesture library use time deltas from MSC_TIMESTAMP, if
these values are provided by the touchpad firmware.

MSC_TIMESTAMP will overflow after 36 minutes, but more importantly, it
is reset to 0 after 1 second of inactivity.  It should also have more
accurate time deltas than CLOCK_MONOTONIC.

This CL modifies timestamps using the more accurate time deltas from
MSC_TIMESTAMP, but reports event times to Chrome browser using
CLOCK_MONOTONIC as a base.

BUG=b:65041115
TEST=Tested manually on lux and eve, using CL:938751, CL:817979 and CL:742488.
CQ-DEPEND=CL:938751

Change-Id: I9bdcd52ca34f556106a9d6c7697d03b3df0c8f10
Reviewed-on: https://chromium-review.googlesource.com/938851
Commit-Ready: Sean O'Brien <seobrien@chromium.org>
Tested-by: Sean O'Brien <seobrien@chromium.org>
Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
5 files changed