"‘CLOCK_PER_SEC’ was not declared in this scope" error even after including <time.h> : <p>I'm getting "‘CLOCK_PER_SEC’ was not declared in this scope" error even after including time.h.
I'm very newbie to c++, so this will be related to simple mistakes, but i sadly can't figure out. please help me.</p>

<pre><code>#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;

#include &lt;time.h&gt;


#define SIZE 1024*1024*1
#define REPEAT 10

using namespace std;

....... 

int main()
{

    const int n = SIZE;


    int* arr = (int*)malloc(n * sizeof(int));
    for (int i = 0; i &lt; n; i++)
    {       
        arr[i] = n - i;
    }


    double totalSeiralTime = 0;
    clock_t clock_s, clock_e;
    for(int i = 0; i &lt; REPEAT ; i++)
    {
        clock_s = clock();

        radixsort(arr, n);

        clock_e = clock();
        double cpu_time_used = ((double)(clock_e-clock_s))/CLOCK_PER_SEC; 
        printf("gpu parallel time : %f\n", cpu_time_used);  
        totalSeiralTime += cpu_time_used;
    }
    printf("cpu serial time mean : %f\n", totalSeiralTime / REPEAT);
  return 0;

}
</code></pre>

<p>how i compile</p>

<pre><code>gcc -std=c++11 ./cpuRadix.cpp -o ./cpuRadix.out
./cpuRadix.out
</code></pre>

<p>I also have tried without std option. But It didn't make change.</p>
