Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 8767c663 authored by Harry Cutts's avatar Harry Cutts
Browse files

uinput: use nanoseconds for delay durations

evemu recordings use microseconds for their time intervals, but we can
only schedule handler calls in Device at millisecond precision. So far
we've converted the microseconds into milliseconds in EvemuParser, which
means that the precision losses compound over time (since each delay
will be slightly shorter than it should be, and the next delay will
start from that slightly earlier time, etc.). Keeping the delay
durations in a more precise unit up until the very last moment means
that we'll only get the precision loss once for each event. Since it's
somewhat uncommon to use microseconds elsewhere in Android code, and we
get the system time in nanoseconds, we may as well use nanoseconds
rather than microseconds.

Bug: 310958309
Test: play an evemu recording through uinput
Test: atest UinputTests
Change-Id: I68d54c05214ae778167adfd0d3fc9a345454c336
parent a0d2cc09
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment