Open jkylearmstrongibx opened 6 years ago
@jkylearmstrongibx There's almost no chance you're still wondering, but you don't supply a name to the toc
function. It's just:
tictoc::tic("CONNECTION_1")
tictoc::toc()
I have just resorted to using Sys.time() and setting manually.
My next question would be how does this work if you have multiple timers? How does toc know which timer to give you the time for?
It's a stack. You can't have overlapping timers, but you can have nested timers.
tictoc::tic("CONNECTION_1")
tictoc::tic("CONNECTION_1 -- part 1")
tictoc::toc() # This ends part 1
tictoc::tic("CONNECTION_1 -- part 2")
tictoc::toc() # This ends part 2
tictoc::toc() # This ends the overall timer
Note that I am not the developer of tictoc, just someone who finds it useful :)
I sorta figured that was the case. Thanks for your insights!
tictoc::tic("CONNECTION_1") tictoc::toc("CONNECTION_1") CONNECTION_1: 3.039 sec elapsed Error in if (log) { : argument is not interpretable as logical