logd: regression in handling watermark boundary.

Deal with a regression introduced in commit
da1b4a18bbb3867ff71ff2b998b7d579e3ab2462 (logd: drop mSequence from
LogBufferElement) where log_time was compared against nsec() time
miscalculating the watermark boundary.  When dealing with logcat
-t/-T, or any tail reading, add a margin to prune to back off by a
period of 3 seconds (pruneMargin).

Test: gTest liblog-unit-tests logcat-unit-tests and logd-unit-tests
Bug: 37378309
Change-Id: I72ea858e4e7b5fa91741ea84c40d2e7c3c4aa031
2 files changed
tree: 7be54b7c88ae710287b03c5875355bfd13e48c07
  1. liblog/
  2. logcat/
  3. logd/
  4. logwrapper/