summaryrefslogtreecommitdiff
path: root/libs/androidfw/FileStream.cpp
diff options
context:
space:
mode:
author Harry Cutts <hcutts@google.com> 2024-02-07 12:51:12 +0000
committer Harry Cutts <hcutts@google.com> 2024-02-08 20:29:40 +0000
commit8767c6634218420add1cf76fec3169138eddb643 (patch)
tree1b0b95ae74e6cdb4bd85e83e74a0764a09b9a979 /libs/androidfw/FileStream.cpp
parenta0d2cc0984ad38e6034f27c0044760bac28cce3b (diff)
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
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions