how to time the execution time of the included program


The problem is clock() function is not allowed, but I have no idea how to deal with time() function in thread.

I think you can use gettimeofday() function to get the start time and end time. While this function work only in Linux. Please refer to [1]:

For this function in windows, please refer to [2]:Equivalent of gettimeday() for Windows