すみません。my_clock()は以下のようになってます。
double my_clock()
{
struct timeval tv;
gettimeofday(&tv, NULL);
return tv.tv_sec + (double)tv.tv_usec*1e-6;
}