tlog icon indicating copy to clipboard operation
tlog copied to clipboard

Add timestamp output facility to tlog-play

Open jeriksson opened this issue 5 years ago • 4 comments

This patch adds the interactive command 'T' to tlog-play. Hitting 'T' during playback enables timestamp output. Whenever playback is paused, a timestamp is output on the console. This timestamp can then be used with -g on the command line to restart playback at the paused location.

jeriksson avatar Aug 06 '20 16:08 jeriksson

Also, hitting T again disables timestamp output.

jeriksson avatar Aug 06 '20 16:08 jeriksson

FWIW, the failed check looks unrelated to this patch. The program builds just fine - something seem to be up with the build environment for the rpm.

jeriksson avatar Aug 06 '20 16:08 jeriksson

Coverage Status

Coverage decreased (-0.03%) to 28.903% when pulling 7854a956a70bc32227e4ac3efbf56bfc2d5cfb33 on jeriksson:master into 960c8d553184a6b58f2ae7a81e709a237a7e76f4 on Scribery:master.

coveralls avatar Aug 06 '20 16:08 coveralls

Thanks for the PR!

Could you please add this timestamp output into the tlog-play man page also? It would be great if this can be added as a general tlog-play option(maybe --pause-timestamp) to allow enabling this functionality on initialization with a command-line option, similar to other options like --paused.

It would be appreciated if you can move the timespec conversion code in tlog_play_run into a function named tlog_timespec_to_timestr in lib/tlog/timestr.c. Please use macros with helpful names as opposed to magic numbers 60 and 3600 in the code.

Lastly, squash all the commits into a single commit to add this functionality.

justin-stephenson avatar Aug 10 '20 14:08 justin-stephenson