Skip to content

Formatting timestamps in trice log #532

Answered by rokath
dAxi-flw6 asked this question in Q&A
Discussion options

You must be logged in to vote

Using 1 second as 32-bit timestamp unit, is, maybe, unnecessary overhead. The Trices arrive typically within 100ms or less at the host side, so the host timestamps could be ok for what you want and they are already formatted the way you want. And your target does not need to handle timestamps at all then.

It is possible to extend the Trice tool with a -ts YMDHMS option to convert seconds into date and time. But that would have the impact, that your target knows the exact second count since 1970-01-01-00-00-00. I do not think, that this makes some sense.

-ts32 s is an invalid usage. See this trice help -log output snippet:

  -ts string
    	Target timestamp general format string at start o…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@dAxi-flw6
Comment options

@dAxi-flw6
Comment options

Answer selected by rokath
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants