Skip to content
Snippets Groups Projects
Commit b2cba9ef authored by Solti Ho's avatar Solti Ho Committed by Android (Google) Code Review
Browse files

Revert "uinput: delay from the end of the last delay"

Revert submission 26154399

Reason for revert: b/324707605

Reverted changes: /q/submissionid:26154399

Change-Id: Ib4ab9a80e74ad5bfec005dd2744458a60bdedde1
parent b959f744
No related branches found
No related tags found
No related merge requests found
......@@ -154,8 +154,7 @@ will be unregistered. There is no explicit command for unregistering a device.
#### `delay`
Add a delay between the processing of commands. The delay will be timed from when the last delay
ended, rather than from the current time, to allow for more precise timings to be produced.
Add a delay to command processing
| Field | Type | Description |
|:-------------:|:-------------:|:-------------------------- |
......
......@@ -149,7 +149,8 @@ public class Device {
* @param delayNanos Time to delay in unit of nanoseconds.
*/
public void addDelayNanos(long delayNanos) {
mTimeToSendNanos += delayNanos;
mTimeToSendNanos =
Math.max(SystemClock.uptimeNanos(), mTimeToSendNanos) + delayNanos;
}
/**
......
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