Simple class for logging time and memory usage of functions