What's the best way to get epoch from tracing event timestamp

326 views
Skip to first unread message

Yao Zuo

unread,
Sep 15, 2017, 11:24:06 AM9/15/17
to Google Chrome Developer Tools
 Trace Event Format says

ts: The tracing clock timestamp of the event. The timestamps are provided at microsecond granularity.

From this answer, we know(I've confirmed it)

ts is the time since OS boot in microseconds (millionths of a second), at least on *nix.

My question is, is there a good way to convert ts to epoch? Seems the only way now is to manually get the system uptime(/proc/uptime) and do the math?

My use case is comparing a click event's time(retrieved from chrome performance log with webdriver) with the IntersectionObserverEntry.time, which can be easily converted to epoch time.

Yao Zuo

unread,
Sep 15, 2017, 11:24:11 AM9/15/17
to Google Chrome Developer Tools
Forgot to add link of the mentioned SO answer: https://stackoverflow.com/a/38550663
Reply all
Reply to author
Forward
0 new messages