Replace time.perf_counter with time.clock()

Unfortunately time.perf_counter was only introduced in
python 3.3 so we can't rely on it being present. Use
time.clock() instead (deprecated with 3.3 but that
can't be helped I guess)