I have a function that internally uses TimerOutputs.jl to time some calls to other functions. Sometimes, however, I want to be able to call this function without having the timers record anything, e.g., when I call the function outside it regular timer hierarchy.
What would be the best way to achieve this (assuming it is not possible with the shipped features of TimerOutputs.jl)? Is it easy enough to write a macro that disables @timeit
macros in the functions it calls? Or should I define a new macro (e.g., @timeit_select
) that I can turn on and off with yet a different macro? Sorry, I am too new to Julia to figure out what the Julian way of achieving this would be, so any help is appreciated.
P.S.: @kristoffer.carlsson Thanks for the great library! Coming from years of HPC software development with C++, I wish I had something as intuitive like TimerOutputs.jl back then…