Add the timing(profiling) function