Even if your program benefits from using OpenMP, you won’t see it because you are measuring the wrong time.
clock() returns the total CPU time spent in all threads. If you run with four threads and each runs for 1/4 of the time,
clock() will still return the same value since 4*(1/4) = 1. You should be measuring the wall-clock time instead.
Replace calls to
gettimeofday(). They both provide high precision wall-clock timing.
P.S. Why are there so many people around SO using
clock() for timing?