You would have to add the synchronization before starting and stopping the timer.
Also, make sure to run a few warmup iterations before the actual profiling and average the timing for a few iterations to get a more stable result.