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
Loading
Please register or sign in to comment