Commit 68bdaf6c authored by Lan Wei's avatar Lan Wei Committed by Commit Bot

Perform pause action at the end of the tick

Because now we can support that adding pause action for the key and
pointer source type, https://chromium-review.googlesource.com/c/
chromium/src/+/1900650, we should check all the pause duration in every
tick and get the maximum value and sleep for the maximum amount of
the pause value at the end of every tick.

Bug: 1020674
Change-Id: I25f992731cd1d982d5fedcf657e72aa3e7ecd7d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1910816Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Commit-Queue: Lan Wei <lanwei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714634}
parent c836a272
...@@ -1518,13 +1518,13 @@ Status ExecutePerformActions(Session* session, ...@@ -1518,13 +1518,13 @@ Status ExecutePerformActions(Session* session,
action_input_states[j]->SetInteger("y", action_locations[id].y()); action_input_states[j]->SetInteger("y", action_locations[id].y());
} }
} }
if (tick_duration > 0) {
base::PlatformThread::Sleep(
base::TimeDelta::FromMilliseconds(tick_duration));
}
} }
} }
if (tick_duration > 0) {
base::PlatformThread::Sleep(
base::TimeDelta::FromMilliseconds(tick_duration));
}
} }
return Status(kOk); return Status(kOk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment