Removed clock() as it does not give real time for threaded programs