Use <chrono> for input-related timeouts

There is a lot of confusion in input tests about the units used for the
timeouts. In a lot of cases, the timeouts are set too short, which
causes failures when they start getting enforced. To avoid this, use
std::chrono::duration for the timeouts.

Ideally, we should convert InputWindowInfo and InputApplicationInfo to
use std::chrono::nanoseconds, but that would be a larger change reserved
for a future release.

Bug: 143459140
Test: atest inputflinger_tests libinput_tests inputflinger_benchmarks
Change-Id: Ie7536e8a042a71b372f03314501e0d635a6ac1d4
diff --git a/services/inputflinger/dispatcher/include/InputDispatcherInterface.h b/services/inputflinger/dispatcher/include/InputDispatcherInterface.h
index 09dc92c..9b002f4 100644
--- a/services/inputflinger/dispatcher/include/InputDispatcherInterface.h
+++ b/services/inputflinger/dispatcher/include/InputDispatcherInterface.h
@@ -90,8 +90,8 @@
      * This method may be called on any thread (usually by the input manager).
      */
     virtual int32_t injectInputEvent(const InputEvent* event, int32_t injectorPid,
-                                     int32_t injectorUid, int32_t syncMode, int32_t timeoutMillis,
-                                     uint32_t policyFlags) = 0;
+                                     int32_t injectorUid, int32_t syncMode,
+                                     std::chrono::milliseconds timeout, uint32_t policyFlags) = 0;
 
     /*
      * Check whether InputEvent actually happened by checking the signature of the event.