trunks: make timeout calculations more accurate
The existing timeout calculation assumes that actual communication
with the chip is instantaneous. It is an almost true assumption for a
hardware interfaced device (LPC), but is wrong for the FTDI case.
Let's use system clock to make sure that timeouts are accurate and
while we are at it set the default timeout to 10 s.
TEST=observed proper timeouts during the test run
BUG=chrome-os-partner:43025
Change-Id: Ibc3dd47d4125bcb61a4af46207ff611bde59f597
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/295551
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
2 files changed