I'm trying to debug embedded software using the method described here https://devzone.nordicsemi.com/question/83524/how-to-use-rtt-viewer-or-similar-on-gnulinux/
What the debugger does is setup a localhost server that provides all the printf like messages from the embedded device under test. Essentially I get the debug output when using the command telnet localhost 19021
What I would like is to print one, the system time and two, the time elapsed from the previous message along with the debug message received. This will help me know the exact time in debug messages in milliseconds (or even microseconds?). How can I easily do this? Thanks.