code to calculate time in nanoseconds
<p>i have following code</p>

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

int main(){

    //nanoseconds
    int x,y;
    x=6700;
    y=10000;
    int z=0;
    clock_t t =clock();

    while (y!=0){
        z+=x&lt;&lt;2;
        x=x&gt;&gt;2;

        y&gt;&gt;=2;
    }
    t=clock()-t;
    t=1000*t/CLOCKS_PER_TICK;
    printf("%d\n",t);
}
</code></pre>

<p>but it writes that</p>

<pre><code>1&gt;c:\users\david\documents\visual studio 2010\projects\nano_seconds\nano_seconds.cpp(20): error C2065: 'CLOCKS_PER_TICK' : undeclared identifier
</code></pre>

<p>but i have read that there exist in c++ such keyword</p>
