what happens when I use torch.profiler.profile with activities=[torch.profiler.ProfilerActivity.CPU, torch.profiler.ProfilerActivity.CUDA]

I use profiler with acitvities=[torch.profiler.ProfilerActivity.CPU, torch.profiler.ProfilerActivity.CUDA] ,and get time 0.22ms in cpu time avg,5.14us in cuda time avg, and when I use time.time() with torch.cuda.synchronize(),the result is 0.24 ms,What is the difference between these results?
my code is like
`activities = [torch.profiler.ProfilerActivity.CPU, torch.profiler.ProfilerActivity.CUDA]
start = time.time()
with torch.profiler.profile(activities= activities, record_shapes=True, profile_memory=False) as pf:
output = model(input)
end = time.time()
runtime = end-start()