Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to print the timestamps as well? #7

Open
randomgambit opened this issue Apr 22, 2019 · 1 comment
Open

how to print the timestamps as well? #7

randomgambit opened this issue Apr 22, 2019 · 1 comment

Comments

@randomgambit
Copy link

Hello !

Thanks for this very useful package. I use tictoc quite a bit. I wonder if it would be possible to add a extended argument to tic() so that not only the elapsed time in seconds is available, but also the starting and ending timestamps (in GMT). What would be very useful to check that programs ran correctly.

What do you think?
Thanks!

@nviraj
Copy link

nviraj commented Aug 23, 2020

When looking into the documentation to see if this was possible, came across this.

func.tic
Function producing the formatted message with a signature f(tic, toc, msg, ...). Here, parameters tic and toc are the elapsed process times in seconds, so the time elapsed between the tic() and toc() calls is computed by toc - tic. msg is the string passed to the tic() call.

Because, it's already process time in seconds, there is no way to format the way you want to and convert to timestamps in func.toc like here.

I am assuming this will involve having to change how the package works itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants