OSDN Git Service

Use same timestamp for on-disk BT Snoop Log and in-memory BT Snooz Log
authorJack He <siyuanh@google.com>
Wed, 8 Feb 2017 01:25:15 +0000 (17:25 -0800)
committerJack He <siyuanh@google.com>
Thu, 9 Feb 2017 22:44:41 +0000 (14:44 -0800)
commit071b507ad4278ae1ad24a188144d18cddf1b7137
tree10ae9c1f55b7bf57ecbc095987a81ae5eef1942f
parent82fc2a96ef7858a086211c780a047d7ab54ba123
Use same timestamp for on-disk BT Snoop Log and in-memory BT Snooz Log

* Logcat uses gettimeofday for its timestamp, the same as on-disk BT
  Snoop log
* Although in-memory BT Snooz Log uses the same method to get time, it
  is calling it separately, resulting in mismatch between timestamps of
  two snoop logs
* This CL let them uses the same timestamp_us value and put the function
  definition to libosi
* Note that preserved on-disk BT Snoop logs timestamp postfix at
      btsnoop_hci_<timestamp>.log
  will be changed to microsecond since epoch at current device timezone
  instead of the shifted BT Snoop timestamp value
* New unit tests for gettimeofday

Bug: 35113514
Test: Make, unit tests, run BT activities and check both snoop logs
Change-Id: I5b3f87bc523b272ced2c69a4595d0e0cbe29bcb3
btif/include/btif_debug.h
btif/src/btif_debug.cc
btif/src/btif_debug_btsnoop.cc
btif/src/btif_debug_conn.cc
hci/include/btsnoop_mem.h
hci/src/btsnoop.cc
hci/src/btsnoop_mem.cc
osi/include/time.h
osi/src/time.cc
osi/test/time_test.cc