adb getevent time format

后端 未结 1 1178
既然无缘
既然无缘 2021-01-28 14:19
adb shell getevent -tl

I\'m running the command above and getting output as I\'d expect. The timestamp, however, is in an odd format (it\'s inside of t

相关标签:
1条回答
  • 2021-01-28 15:08

    The timestamp is in timeval format. Its absolute value has no meaning. Its purpose is to allow to calculate intervals between separate events.

    One more time, there is no universal meaning to the absolute value of the getevent timestamp. In some cases it might look like system uptime or epoch time but it is not guaranteed to be the same on other devices or even on the same device under different conditions. Kernel uses this timestamp to calculate the time delta between separate events, nothing more. The absolute value does not matter.

    The way you convert it to a human readable format is by selecting relatively small group of events and subtracting the timestamp of the first event from timestamps of all events in that group. Treat the resulting numbers like any other fractional seconds.

    0 讨论(0)
提交回复
热议问题