Here is one suggested solution:
Record all the time at any of the fastest. When you present them to the user through a graphical interface, a log file or something else, do the conversion to local time.
Since most graphical interfaces and log output are single-threaded, this should remove competition from the rest of the program.
If the program never presents the data to the user, simply write it in quick time format and use the post-processing tool to convert or display it.
source share