Problems trying to construct a wrapper measuring function call time
问题 I'm implementing some data structures, each supporting a set of commands such as INSERT value . I've used a tokenizer to generate a vector that holds each word/value. I want to be able to output to a .txt file the time every function call took, plus what the function returned if it does return something. For example, if the command is INSERT AVLTREE 4 , I want to just output the time calling avl.insert(4) took. If the command is SEARCH AVLTREE 4 , I want to output the time calling avl.search