Check clock synchronization between DUT and packet tracer.

- use Linux 'date' command to get local time since epoch
- if clock skew >= 1 sec, we attempt to force tlsdate restart on both
  DUT and tracer (exactly once)
- if clock skew is still >= 1 sec after tlsdate restart, a TestError
  is raised

BUG=chromium:222447
TEST=Manual (modified network_WiFiSimpleConnectionServer/ and tested
both success and failure cases by manually manipulating system clocks
on DUT and tracer to verify correct behavior)

Change-Id: I2bc858830a5604157795ae1974331b9831027a22
Reviewed-on: https://gerrit.chromium.org/gerrit/46033
Commit-Queue: Tan Gao <tgao@chromium.org>
Reviewed-by: Tan Gao <tgao@chromium.org>
Tested-by: Tan Gao <tgao@chromium.org>
3 files changed