Add a function to log with a timestamp.
In order to avoid waking the entire Android OS, it might be better to
batch log messages in a buffer and send them later. When doing this,
the code wants to preserve the original timestamps and pass those in
when sending the messages. Add a new function to do this.
Add a new unit tests to verify this functionality.
Bug: 393191584
Test: All unit tests pass.
Test: Wrote a log message with a zero timestamp and verified the log
Test: contains this message with a timestamp.
Test: Verified logcat using a time filter, out of order messages are properly
Test: filtered out and other messages after are still printed.
Change-Id: Ie4228d6b5ba70baf7b0ac9ba7ad8c102f7dfc35a
GitOrigin-RevId: 763e629f0df59af2c051c6edf042a8f6a12bb30d
3 files changed
tree: 391c1b3685419301664b0803edadacc6ac518fd2
- liblog/